-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Closed
Labels
StringArea → standard library: The `String` typeArea → standard library: The `String` typebugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itselfThe Swift compiler itselfcrashBug: A crash, i.e., an abnormal termination of softwareBug: A crash, i.e., an abnormal termination of softwaredeclarationsFeature: declarationsFeature: declarationsenumFeature → type declarations: Swift enumeration declarationsFeature → type declarations: Swift enumeration declarationsenum casesFeature → enums: Enum casesFeature → enums: Enum casesoverloadingFeature: Overloading symbol namesFeature: Overloading symbol namesraw valuesFeature → enums → enum cases: Inline raw valuesFeature → enums → enum cases: Inline raw valuesstandard libraryArea: Standard library umbrellaArea: Standard library umbrellaswift 5.9type checkerArea → compiler: Semantic analysisArea → compiler: Semantic analysis
Description
struct A
{
enum CodingKeys:String
{
case a
case b
case b
}
}
crashes with
sourcekit-lsp: /home/build-user/swift/lib/Sema/TypeCheckDecl.cpp:1340: evaluator::SideEffect swift::EnumRawValuesRequest::evaluate(swift::Evaluator &, swift::EnumDecl *, swift::TypeResolutionStage) const: Assertion `lastExplicitValueElt && "should not be able to have non-unique raw values when " "relying on autoincrement"' failed.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0. While evaluating request TypeCheckSourceFileRequest(source_file "/swift/swift-mongodb/crash.0.swift")
1. While type-checking 'A' (at /swift/swift-mongodb/crash.0.swift:1:1)
2. While type-checking 'CodingKeys' (at /swift/swift-mongodb/crash.0.swift:3:5)
3. While type-checking 'a' (at /swift/swift-mongodb/crash.0.swift:5:14)
4. While evaluating request EnumRawValuesRequest(main.(file).A.CodingKeys@/swift/swift-mongodb/crash.0.swift:3:10, interface)
[Error - 3:14:02 AM] Request textDocument/codeAction failed.
on swift-5.8-DEVELOPMENT-SNAPSHOT-2023-02-09-a
. (amazon linux2 nightly docker container)
Metadata
Metadata
Assignees
Labels
StringArea → standard library: The `String` typeArea → standard library: The `String` typebugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itselfThe Swift compiler itselfcrashBug: A crash, i.e., an abnormal termination of softwareBug: A crash, i.e., an abnormal termination of softwaredeclarationsFeature: declarationsFeature: declarationsenumFeature → type declarations: Swift enumeration declarationsFeature → type declarations: Swift enumeration declarationsenum casesFeature → enums: Enum casesFeature → enums: Enum casesoverloadingFeature: Overloading symbol namesFeature: Overloading symbol namesraw valuesFeature → enums → enum cases: Inline raw valuesFeature → enums → enum cases: Inline raw valuesstandard libraryArea: Standard library umbrellaArea: Standard library umbrellaswift 5.9type checkerArea → compiler: Semantic analysisArea → compiler: Semantic analysis