Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SR-9671] compiler crash: expression has no type / (declref_expr type='<null>' decl=Logging.(file). extension.init(stringLiteral:) #52115

Closed
weissi opened this issue Jan 15, 2019 · 0 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself crash Bug: A crash, i.e., an abnormal termination of software

Comments

@weissi
Copy link
Member

weissi commented Jan 15, 2019

Previous ID SR-9671
Radar rdar://problem/47317637
Original Reporter @weissi
Type Bug
Status Resolved
Resolution Duplicate

Attachment: Download

Additional Detail from JIRA
Votes 1
Component/s Compiler
Labels Bug, CompilerCrash
Assignee None
Priority Medium

md5: a6aea1968cebc2ee1c664ed78ad8db1c

duplicates:

  • SR-9686 Swift 5 regression: extension applied to type alias not "seen"

is duplicated by:

  • SR-9687 Compiler crash with "expression has no type" with extensions on type aliases

Issue Description:

running swift build in the attached tar ball gives

expression has no type
(declref_expr type='<null>' decl=Logging.(file). extension.init(stringLiteral:).self@/Users/johannes/devel/swift-server-logger-api/Sources/Logging/Logging.swift:277:12 function_ref=unapplied)Stack dump:
0.  Program arguments: /Library/Developer/Toolchains/swift-5.0-DEVELOPMENT-SNAPSHOT-2019-01-13-a.xctoolchain/usr/bin/swift -frontend -c /Users/johannes/devel/swift-server-logger-api/Sources/Logging/Locks.swift -primary-file /Users/johannes/devel/swift-server-logger-api/Sources/Logging/Logging.swift -emit-module-path /Users/johannes/devel/swift-server-logger-api/.build/x86_64-apple-macosx/debug/Logging.build/Logging~partial.swiftmodule -emit-module-doc-path /Users/johannes/devel/swift-server-logger-api/.build/x86_64-apple-macosx/debug/Logging.build/Logging~partial.swiftdoc -emit-dependencies-path /Users/johannes/devel/swift-server-logger-api/.build/x86_64-apple-macosx/debug/Logging.build/Logging.d -emit-reference-dependencies-path /Users/johannes/devel/swift-server-logger-api/.build/x86_64-apple-macosx/debug/Logging.build/Logging.swiftdeps -target x86_64-apple-macosx10.10 -enable-objc-interop -sdk /Volumes/Xcode10E85_m18E173z_i16E180z_t16L181_w16T180z_b16P4075_32bitSupport_FastSim_Boost_32GB/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -I /Users/johannes/devel/swift-server-logger-api/.build/x86_64-apple-macosx/debug -F /Volumes/Xcode10E85_m18E173z_i16E180z_t16L181_w16T180z_b16P4075_32bitSupport_FastSim_Boost_32GB/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks -enable-testing -g -module-cache-path /Users/johannes/devel/swift-server-logger-api/.build/x86_64-apple-macosx/debug/ModuleCache -swift-version 4.2 -Onone -D SWIFT_PACKAGE -D DEBUG -color-diagnostics -parse-as-library -module-name Logging -o /Users/johannes/devel/swift-server-logger-api/.build/x86_64-apple-macosx/debug/Logging.build/Logging.swift.o -index-store-path /Users/johannes/devel/swift-server-logger-api/.build/x86_64-apple-macosx/debug/index/store -index-system-modules 
1.  While walking into decl extension of Logging.Metadata.Value (at /Users/johannes/devel/swift-server-logger-api/Sources/Logging/Logging.swift:274:1)
2.  While walking into body of 'init(stringLiteral:)' (at /Users/johannes/devel/swift-server-logger-api/Sources/Logging/Logging.swift:277:12)
0  swift                    0x00000001091c5858 llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 40
1  swift                    0x00000001091c4ad5 llvm::sys::RunSignalHandlers() + 85
2  swift                    0x00000001091c5e62 SignalHandler(int) + 258
3  libsystem_platform.dylib 0x00007fff78d02b3d _sigtramp + 29
4  libsystem_platform.dylib 0x00007fece907de98 _sigtramp + 1882698616
5  libsystem_c.dylib        0x00007fff78bc01c9 abort + 127
6  swift                    0x000000010687e6ec (anonymous namespace)::Verifier::walkToExprPost(swift::Expr*) + 27340
7  swift                    0x000000010688c4e6 swift::ASTVisitor<(anonymous namespace)::Traversal, swift::Expr*, swift::Stmt*, bool, swift::Pattern*, bool, void>::visit(swift::Expr*) + 6742
8  swift                    0x000000010688d7e7 swift::ASTVisitor<(anonymous namespace)::Traversal, swift::Expr*, swift::Stmt*, bool, swift::Pattern*, bool, void>::visit(swift::Stmt*) + 359
9  swift                    0x000000010689079b (anonymous namespace)::Traversal::visitAbstractFunctionDecl(swift::AbstractFunctionDecl*) + 683
10 swift                    0x000000010688aa18 (anonymous namespace)::Traversal::doIt(swift::Decl*) + 216
11 swift                    0x000000010688fab6 swift::ASTVisitor<(anonymous namespace)::Traversal, swift::Expr*, swift::Stmt*, bool, swift::Pattern*, bool, void>::visit(swift::Decl*) + 1558
12 swift                    0x000000010688aa18 (anonymous namespace)::Traversal::doIt(swift::Decl*) + 216
13 swift                    0x000000010688a92b swift::Decl::walk(swift::ASTWalker&) + 27
14 swift                    0x0000000106941aea swift::SourceFile::walk(swift::ASTWalker&) + 170
ourceFile&) + 59
16 swift                    0x000000010663851a swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int) + 1386
17 swift                    0x0000000105e03065 swift::CompilerInstance::parseAndCheckTypesUpTo(swift::CompilerInstance::ImplicitImports const&, swift::SourceFile::ASTStage_t) + 629
18 swift                    0x0000000105e02658 swift::CompilerInstance::performSemaUpTo(swift::SourceFile::ASTStage_t) + 616
19 swift                    0x00000001055dd74d performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&, swift::FrontendObserver*, swift::UnifiedStatsReporter*) + 1309
20 swift                    0x00000001055dc19d swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 3021
21 swift                    0x000000010558e0be main + 686
22 libdyld.dylib            0x00007fff78b17ed9 start + 1
<unknown>:0: error: unable to execute command: Abort trap: 6
<unknown>:0: error: compile command failed due to signal 6 (use -v to see invocation)

for all recent Swift 5.0 dev snapshots, for exmaple

Apple Swift version 5.0-dev (LLVM ed64f75263, Clang e5012f3421, Swift 5a827a9558)
Target: x86_64-apple-darwin18.2.0
@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@AnthonyLatsis AnthonyLatsis added the crash Bug: A crash, i.e., an abnormal termination of software label Dec 12, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself crash Bug: A crash, i.e., an abnormal termination of software
Projects
None yet
Development

No branches or pull requests

2 participants