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-7002] Compiler crash when try to extend OptionSet with ExpressibleByIntegerLiteral #49550
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
type checker
Area → compiler: Semantic analysis
Comments
In a debug compiler: extension of Foo is missing witness for ExpressibleByIntegerLiteral.init
0 swift 0x00000001167a1dcc llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 60
1 swift 0x00000001167a23c9 PrintStackTraceSignalHandler(void*) + 25
2 swift 0x000000011679db89 llvm::sys::RunSignalHandlers() + 425
3 swift 0x00000001167a2822 SignalHandler(int) + 354
4 libsystem_platform.dylib 0x00007fff7d119f5a _sigtramp + 26
5 libsystem_platform.dylib 0x000000012ba9b670 _sigtramp + 2929202992
6 libsystem_c.dylib 0x00007fff7cec41ae abort + 127
7 swift 0x0000000111586a3a (anonymous namespace)::Verifier::verifyConformance(swift::Decl*, swift::ProtocolConformance*) + 2250
8 swift 0x000000011158c4c0 (anonymous namespace)::Verifier::verifyChecked(swift::ExtensionDecl*) + 448
9 swift 0x00000001115831d0 swift::ExtensionDecl* (anonymous namespace)::Verifier::dispatchVisitPost<swift::ExtensionDecl*>(swift::ExtensionDecl*) + 528
10 swift 0x000000011154d6d5 (anonymous namespace)::Verifier::walkToDeclPost(swift::Decl*) + 1317
11 swift 0x000000011158f1c7 (anonymous namespace)::Traversal::doIt(swift::Decl*) + 167
12 swift 0x000000011158f110 swift::Decl::walk(swift::ASTWalker&) + 64
13 swift 0x000000011179970d swift::SourceFile::walk(swift::ASTWalker&) + 525
14 swift 0x0000000111549926 swift::verify(swift::SourceFile&) + 150
15 swift 0x0000000110f651db swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int, unsigned int, unsigned int, unsigned int) + 2027
16 swift 0x00000001105d1d2e swift::CompilerInstance::parseAndTypeCheckMainFile(swift::PersistentParserState&, swift::DelayedParsingCallbacks*, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>) + 926
17 swift 0x00000001105cdcc9 swift::CompilerInstance::parseAndCheckTypes(swift::CompilerInstance::ImplicitImports const&) + 697
18 swift 0x00000001105cd479 swift::CompilerInstance::performSema() + 1833
19 swift 0x000000010ec87d06 performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&, swift::FrontendObserver*, swift::UnifiedStatsReporter*) + 646
20 swift 0x000000010ec862be swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 7406
21 swift 0x000000010ebacaa2 main + 4834
22 libdyld.dylib 0x00007fff7ce18021 start + 1
Stack dump:
0. Program arguments: /Users/jgroff/src/s/build/Ninja-DebugAssert/swift-macosx-x86_64/bin/swift -frontend -interpret /Users/jgroff/foo.swift -enable-objc-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk -color-diagnostics -module-name foo
1. While walking into decl extension of Foo at /Users/jgroff/foo.swift:6:1
2. While verifying protocol conformance extension of Foo at /Users/jgroff/foo.swift:6:1
Abort trap: 6 Looks like we're failing to diagnose the fact that |
@swift-ci create |
This no longer crashes in 7002.swift:6:1: error: type 'Foo' does not conform to protocol 'ExpressibleByIntegerLiteral'
extension Foo: ExpressibleByIntegerLiteral { }
^
Swift.ExpressibleByIntegerLiteral:2:20: note: protocol requires nested type 'IntegerLiteralType'; do you want to add it?
associatedtype IntegerLiteralType : _ExpressibleByBuiltinIntegerLiteral
^ |
Confirmed that this is fixed with 4.2. |
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
type checker
Area → compiler: Semantic analysis
Environment
Swift 4.0.3
Additional Detail from JIRA
md5: 6dd1255aba018996941dbd98a599c6fc
Issue Description:
The text was updated successfully, but these errors were encountered: