We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
md5: 35c9d952abcdef21cf96c389ddaf99d2
is duplicated by:
Issue Description:
enum X { case a(()) case a(_z: ()) } func g(_ x: X) { switch x { case .a: () } }
This triggers an assertion failure on master @ ad00350.
Assertion failed: (!foundElement && "ambiguity in enum case name lookup?!"), function filterForEnumElement, file /Users/varun/foss-swift/swift/lib/Sema/TypeCheckPattern.cpp, line 98. Stack dump: 0. Program arguments: /Users/varun/foss-swift/build/Ninja-RelWithDebInfoAssert/swift-macosx-x86_64/bin/swift -frontend -c -primary-file /Users/varun/Tmp.swift -target x86_64-apple-darwin19.4.0 -enable-objc-interop -color-diagnostics -module-name Tmp -o /var/folders/9t/dn6p4v392nb8c8cwxfyxc84c0000gn/T/Tmp-90f416.o 1. Swift version 5.3-dev (LLVM 6c12ce6117, Swift ad003502db) 2. While evaluating request TypeCheckSourceFileRequest(source_file "/Users/varun/Tmp.swift") 3. While evaluating request TypeCheckFunctionBodyUntilRequest(Tmp.(file).g@/Users/varun/Tmp.swift:6:6, ) 4. While type-checking statement at [/Users/varun/Tmp.swift:6:16 - line:10:1] RangeText="{ switch x { case .a: () } " 5. While type-checking statement at [/Users/varun/Tmp.swift:7:5 - line:9:5] RangeText="switch x { case .a: () " 0 swift 0x00000001074ab725 llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 37 1 swift 0x00000001074aa975 llvm::sys::RunSignalHandlers() + 85 2 swift 0x00000001074abcf6 SignalHandler(int) + 262 3 libsystem_platform.dylib 0x00007fff693175fd _sigtramp + 29 4 libsystem_platform.dylib 000000000000000000 _sigtramp + 18446603338751314464 5 libsystem_c.dylib 0x00007fff691ed808 abort + 120 6 libsystem_c.dylib 0x00007fff691ecac6 err + 0 7 swift 0x00000001078b9011 filterForEnumElement(swift::DeclContext*, swift::SourceLoc, bool, swift::LookupResult) (.cold.9) + 33 8 swift 0x0000000104032a52 filterForEnumElement(swift::DeclContext*, swift::SourceLoc, bool, swift::LookupResult) + 706 9 swift 0x00000001040321af lookupEnumMemberElement(swift::DeclContext*, swift::Type, swift::DeclNameRef, swift::SourceLoc) + 191 10 swift 0x000000010402f1c7 swift::TypeChecker::coercePatternToType(swift::ContextualPattern, swift::Type, swift::TypeResolutionOptions) + 3479
It should probably issue an error about the ambiguity instead.
The text was updated successfully, but these errors were encountered:
@swift-ci create
Sorry, something went wrong.
I think this is the same as SR-12229
No branches or pull requests
Additional Detail from JIRA
md5: 35c9d952abcdef21cf96c389ddaf99d2
is duplicated by:
Issue Description:
This triggers an assertion failure on master @ ad00350.
It should probably issue an error about the ambiguity instead.
The text was updated successfully, but these errors were encountered: