swiftlang / swift

The Swift Programming Language
https://swift.org
Apache License 2.0
67.57k stars 10.36k forks source link

[6.0] Compiler crashes for code that was compiling with older toolchains #76479

Closed soumyamahunt closed 1 month ago

soumyamahunt commented 1 month ago

Description

If I try to compile Swift package: https://github.com/SwiftyLab/MetaCodable with Swift 5.9 toolchain package is built without errors. When trying to compile with Swift 5.10 following compiler crash occurs:

> /usr/bin/swift build --build-tests

Building for debugging...
error: compile command failed due to signal 6 (use -v to see invocation)
Term verification failed
Initial term:    τ_0_0.[MemberGroupSyntax:MemberSyntax].[VariableSyntax:Variable]
Erased term:     τ_0_0.MemberSyntax.Variable
Simplified term: τ_0_0.[MemberGroupSyntax:MemberSyntax].Variable

Requirement machine for <τ_0_0, τ_1_0 where τ_0_0 : AttributableDeclSyntax, τ_0_0 : GenericTypeDeclSyntax, τ_0_0 : MemberGroupSyntax, τ_1_0 : MacroExpansionContext, τ_0_0.ChildSyntaxInput == (), τ_0_0.MemberSyntax == PropertyDeclSyntax>
Rewrite system: {
- [AttributableDeclSyntax].[AttributableDeclSyntax] => [AttributableDeclSyntax] [permanent]
- [AttributableDeclSyntax].[Copyable] => [AttributableDeclSyntax] [explicit]
- [AttributableDeclSyntax].[Escapable] => [AttributableDeclSyntax] [explicit]
- [GenericTypeDeclSyntax].[GenericTypeDeclSyntax] => [GenericTypeDeclSyntax] [permanent]
- [GenericTypeDeclSyntax].[Copyable] => [GenericTypeDeclSyntax] [explicit]
- [GenericTypeDeclSyntax].[Escapable] => [GenericTypeDeclSyntax] [explicit]
- [MemberGroupSyntax].[MemberGroupSyntax] => [MemberGroupSyntax] [permanent]
- [MemberGroupSyntax].MemberSyntax => [MemberGroupSyntax:MemberSyntax] [permanent]
- [MemberGroupSyntax].ChildSyntaxInput => [MemberGroupSyntax:ChildSyntaxInput] [permanent]
- [MemberGroupSyntax].[Copyable] => [MemberGroupSyntax] [explicit]
- [MemberGroupSyntax].[Escapable] => [MemberGroupSyntax] [explicit]
- [MemberGroupSyntax:MemberSyntax].[Copyable] => [MemberGroupSyntax:MemberSyntax] [explicit]
- [MemberGroupSyntax:MemberSyntax].[Escapable] => [MemberGroupSyntax:MemberSyntax] [explicit]
- [MemberGroupSyntax:ChildSyntaxInput].[Copyable] => [MemberGroupSyntax:ChildSyntaxInput] [explicit]
- [MemberGroupSyntax:ChildSyntaxInput].[Escapable] => [MemberGroupSyntax:ChildSyntaxInput] [explicit]
- [MemberGroupSyntax].[MemberGroupSyntax:MemberSyntax] => [MemberGroupSyntax:MemberSyntax]
- [MemberGroupSyntax].[MemberGroupSyntax:ChildSyntaxInput] => [MemberGroupSyntax:ChildSyntaxInput]
- [MacroExpansionContext].[MacroExpansionContext] => [MacroExpansionContext] [permanent]
- [MacroExpansionContext].[layout: AnyObject] => [MacroExpansionContext] [explicit]
- [MacroExpansionContext].[Copyable] => [MacroExpansionContext] [explicit]
- [MacroExpansionContext].[Escapable] => [MacroExpansionContext] [explicit]
- [Copyable].[Copyable] => [Copyable] [permanent]
- [Escapable].[Escapable] => [Escapable] [permanent]
- τ_0_0.[AttributableDeclSyntax] => τ_0_0 [explicit]
- τ_0_0.[GenericTypeDeclSyntax] => τ_0_0 [explicit]
- τ_0_0.[MemberGroupSyntax] => τ_0_0 [explicit]
- τ_0_0.[MemberGroupSyntax:ChildSyntaxInput].[concrete: ()] => τ_0_0.[MemberGroupSyntax:ChildSyntaxInput] [explicit]
- τ_0_0.[MemberGroupSyntax:MemberSyntax].[concrete: PropertyDeclSyntax] => τ_0_0.[MemberGroupSyntax:MemberSyntax] [explicit]
- τ_1_0.[MacroExpansionContext] => τ_1_0 [explicit]
- τ_1_0.[Copyable] => τ_1_0 [explicit]
- τ_1_0.[Escapable] => τ_1_0 [explicit]
- τ_0_0.[Copyable] => τ_0_0
- τ_0_0.[Escapable] => τ_0_0
- τ_0_0.MemberSyntax => τ_0_0.[MemberGroupSyntax:MemberSyntax]
- τ_0_0.ChildSyntaxInput => τ_0_0.[MemberGroupSyntax:ChildSyntaxInput]
- τ_1_0.[layout: AnyObject] => τ_1_0
- τ_0_0.[MemberGroupSyntax:ChildSyntaxInput].[concrete: () : Copyable] => τ_0_0.[MemberGroupSyntax:ChildSyntaxInput]
- τ_0_0.[MemberGroupSyntax:ChildSyntaxInput].[concrete: () : Escapable] => τ_0_0.[MemberGroupSyntax:ChildSyntaxInput]
- τ_0_0.[MemberGroupSyntax:MemberSyntax].[concrete: PropertyDeclSyntax : Copyable] => τ_0_0.[MemberGroupSyntax:MemberSyntax]
- τ_0_0.[MemberGroupSyntax:MemberSyntax].[concrete: PropertyDeclSyntax : Escapable] => τ_0_0.[MemberGroupSyntax:MemberSyntax]
}
Property map: {
  [AttributableDeclSyntax] => { conforms_to: [AttributableDeclSyntax Copyable Escapable] }
  [GenericTypeDeclSyntax] => { conforms_to: [GenericTypeDeclSyntax Copyable Escapable] }
  [MemberGroupSyntax] => { conforms_to: [MemberGroupSyntax Copyable Escapable] }
  [MemberGroupSyntax:MemberSyntax] => { conforms_to: [Copyable Escapable] }
  [MemberGroupSyntax:ChildSyntaxInput] => { conforms_to: [Copyable Escapable] }
  [MacroExpansionContext] => { conforms_to: [MacroExpansionContext Copyable Escapable] layout: AnyObject }
  [Copyable] => { conforms_to: [Copyable] }
  [Escapable] => { conforms_to: [Escapable] }
  τ_0_0 => { conforms_to: [AttributableDeclSyntax GenericTypeDeclSyntax MemberGroupSyntax Copyable Escapable] }
  τ_1_0 => { conforms_to: [MacroExpansionContext Copyable Escapable] layout: AnyObject }
  τ_0_0.[MemberGroupSyntax:ChildSyntaxInput] => { conforms_to: [Copyable Escapable] concrete_type: [concrete: ()] }
  τ_0_0.[MemberGroupSyntax:MemberSyntax] => { conforms_to: [Copyable Escapable] concrete_type: [concrete: PropertyDeclSyntax] }
}
Conformance paths: {
}
Please submit a bug report (https://swift.org/contributing/#reporting-bugs) and include the crash backtrace.
Stack dump:
0.      Program arguments: /usr/bin/swift-frontend -frontend -c /workspaces/MetaCodable/Sources/PluginCore/Attributes/AttributableDeclSyntax.swift /workspaces/MetaCodable/Sources/PluginCore/Attributes/Attribute.swift /workspaces/MetaCodable/Sources/PluginCore/Attributes/Codable/Codable+Expansion.swift /workspaces/MetaCodable/Sources/PluginCore/Attributes/Codable/Codable.swift /workspaces/MetaCodable/Sources/PluginCore/Attributes/Codable/CodingKeys/CodingKeyTransformer.swift /workspaces/MetaCodable/Sources/PluginCore/Attributes/Codable/CodingKeys/CodingKeys.swift /workspaces/MetaCodable/Sources/PluginCore/Attributes/Codable/CodingKeys/Strategy.swift /workspaces/MetaCodable/Sources/PluginCore/Attributes/Codable/IgnoreCodingInitialized.swift /workspaces/MetaCodable/Sources/PluginCore/Attributes/Codable/Inherits.swift /workspaces/MetaCodable/Sources/PluginCore/Attributes/Codable/UnTagged.swift /workspaces/MetaCodable/Sources/PluginCore/Attributes/CodedAs.swift /workspaces/MetaCodable/Sources/PluginCore/Attributes/CodedBy.swift /workspaces/MetaCodable/Sources/PluginCore/Attributes/Default.swift /workspaces/MetaCodable/Sources/PluginCore/Attributes/IgnoreCoding/IgnoreCoding.swift /workspaces/MetaCodable/Sources/PluginCore/Attributes/IgnoreCoding/IgnoreDecoding.swift /workspaces/MetaCodable/Sources/PluginCore/Attributes/IgnoreCoding/IgnoreEncoding.swift /workspaces/MetaCodable/Sources/PluginCore/Attributes/KeyPath/CodedAt.swift /workspaces/MetaCodable/Sources/PluginCore/Attributes/KeyPath/CodedIn.swift /workspaces/MetaCodable/Sources/PluginCore/Attributes/KeyPath/ContentAt.swift /workspaces/MetaCodable/Sources/PluginCore/Attributes/KeyPath/KeyPathProvider.swift /workspaces/MetaCodable/Sources/PluginCore/Attributes/MemberInit/MemberInit+Expansion.swift /workspaces/MetaCodable/Sources/PluginCore/Attributes/MemberInit/MemberInit.swift /workspaces/MetaCodable/Sources/PluginCore/Attributes/PeerAttribute.swift /workspaces/MetaCodable/Sources/PluginCore/Diagnostics/AggregatedDiagnosticProducer.swift /workspaces/MetaCodable/Sources/PluginCore/Diagnostics/CombinedUsage.swift /workspaces/MetaCodable/Sources/PluginCore/Diagnostics/Condition/ArgumentCountCondition.swift /workspaces/MetaCodable/Sources/PluginCore/Diagnostics/Condition/DeclarationCondition.swift /workspaces/MetaCodable/Sources/PluginCore/Diagnostics/Condition/DiagnosticCondition.swift /workspaces/MetaCodable/Sources/PluginCore/Diagnostics/ConditionalDiagnosticProducer.swift /workspaces/MetaCodable/Sources/PluginCore/Diagnostics/DiagnosticProducer.swift /workspaces/MetaCodable/Sources/PluginCore/Diagnostics/DuplicateUsage.swift /workspaces/MetaCodable/Sources/PluginCore/Diagnostics/GroupedVariableDeclaration.swift /workspaces/MetaCodable/Sources/PluginCore/Diagnostics/InvalidCombination.swift /workspaces/MetaCodable/Sources/PluginCore/Diagnostics/InvalidDeclaration.swift /workspaces/MetaCodable/Sources/PluginCore/Diagnostics/MetaCodableMessage.swift /workspaces/MetaCodable/Sources/PluginCore/Diagnostics/StaticVariableDeclaration.swift /workspaces/MetaCodable/Sources/PluginCore/Diagnostics/UninitializedVariableDecl.swift /workspaces/MetaCodable/Sources/PluginCore/Expansion/AttributeExpander.swift /workspaces/MetaCodable/Sources/PluginCore/Expansion/Options/DeclModifiersGenerator.swift /workspaces/MetaCodable/Sources/PluginCore/Expansion/Options/Options.swift /workspaces/MetaCodable/Sources/PluginCore/Variables/ComposedVariable.swift /workspaces/MetaCodable/Sources/PluginCore/Variables/ConditionalCodingVariable.swift /workspaces/MetaCodable/Sources/PluginCore/Variables/Enum/Case/Associated/AssociatedVariable.swift /workspaces/MetaCodable/Sources/PluginCore/Variables/Enum/Case/Associated/BasicAssociatedVariable.swift /workspaces/MetaCodable/Sources/PluginCore/Variables/Enum/Case/BasicEnumCaseVariable.swift /workspaces/MetaCodable/Sources/PluginCore/Variables/Enum/Case/EnumCaseVariable.swift /workspaces/MetaCodable/Sources/PluginCore/Variables/Enum/Switcher/AdjacentlyTaggableSwitcher.swift /workspaces/MetaCodable/Sources/PluginCore/Variables/Enum/Switcher/AdjacentlyTaggedEnumSwitcher.swift /workspaces/MetaCodable/Sources/PluginCore/Variables/Enum/Switcher/AnyEnumSwitcher.swift /workspaces/MetaCodable/Sources/PluginCore/Variables/Enum/Switcher/EnumSwitcherVariable.swift /workspaces/MetaCodable/Sources/PluginCore/Variables/Enum/Switcher/ExternallyTaggedEnumSwitcher.swift /workspaces/MetaCodable/Sources/PluginCore/Variables/Enum/Switcher/InternallyTaggedEnumSwitcher.swift /workspaces/MetaCodable/Sources/PluginCore/Variables/Enum/Switcher/TaggedEnumSwitcherVariable.swift /workspaces/MetaCodable/Sources/PluginCore/Variables/Enum/Switcher/UnTaggedEnumSwitcher.swift /workspaces/MetaCodable/Sources/PluginCore/Variables/Initialization/AnyInitialization.swift /workspaces/MetaCodable/Sources/PluginCore/Variables/Initialization/AnyRequiredVariableInitialization.swift /workspaces/MetaCodable/Sources/PluginCore/Variables/Initialization/IgnoredInitialization.swift /workspaces/MetaCodable/Sources/PluginCore/Variables/Initialization/MemberwiseInitGenerator.swift /workspaces/MetaCodable/Sources/PluginCore/Variables/Initialization/OptionalInitialization.swift /workspaces/MetaCodable/Sources/PluginCore/Variables/Initialization/RequiredInitialization.swift /workspaces/MetaCodable/Sources/PluginCore/Variables/Initialization/RequiredInitializationWithDefaultValue.swift /workspaces/MetaCodable/Sources/PluginCore/Variables/Initialization/RequiredVariableInitialization.swift /workspaces/MetaCodable/Sources/PluginCore/Variables/Initialization/VariableInitialization.swift /workspaces/MetaCodable/Sources/PluginCore/Variables/Property/AliasedPropertyVariable.swift /workspaces/MetaCodable/Sources/PluginCore/Variables/Property/AnyPropertyVariable.swift /workspaces/MetaCodable/Sources/PluginCore/Variables/Property/BasicPropertyVariable.swift /workspaces/MetaCodable/Sources/PluginCore/Variables/Property/Data/DecodingFallback.swift /workspaces/MetaCodable/Sources/PluginCore/Variables/Property/DefaultValueVariable.swift /workspaces/MetaCodable/Sources/PluginCore/Variables/Property/HelperCodedVariable.swift /workspaces/MetaCodable/Sources/PluginCore/Variables/Property/InitializationVariable.swift /workspaces/MetaCodable/Sources/PluginCore/Variables/Property/KeyedVariable.swift /workspaces/MetaCodable/Sources/PluginCore/Variables/Property/PropertyVariable.swift /workspaces/MetaCodable/Sources/PluginCore/Variables/Property/Tree/PropertyVariableTreeNode+CodingData.swift /workspaces/MetaCodable/Sources/PluginCore/Variables/Property/Tree/PropertyVariableTreeNode+CodingLocation.swift /workspaces/MetaCodable/Sources/PluginCore/Variables/Property/Tree/PropertyVariableTreeNode+Generated.swift /workspaces/MetaCodable/Sources/PluginCore/Variables/Property/Tree/PropertyVariableTreeNode.swift /workspaces/MetaCodable/Sources/PluginCore/Variables/Syntax/AssociatedDeclSyntax.swift /workspaces/MetaCodable/Sources/PluginCore/Variables/Syntax/EnumCaseVariableDeclSyntax.swift /workspaces/MetaCodable/Sources/PluginCore/Variables/Syntax/MemberGroupSyntax.swift /workspaces/MetaCodable/Sources/PluginCore/Variables/Syntax/PropertyDeclSyntax.swift /workspaces/MetaCodable/Sources/PluginCore/Variables/Syntax/VariableSyntax.swift /workspaces/MetaCodable/Sources/PluginCore/Variables/Type/ActorVariable.swift /workspaces/MetaCodable/Sources/PluginCore/Variables/Type/ClassVariable.swift /workspaces/MetaCodable/Sources/PluginCore/Variables/Type/Data/CodingKeysMap/Case.swift -primary-file /workspaces/MetaCodable/Sources/PluginCore/Variables/Type/Data/CodingKeysMap/CodingKeysMap.swift -primary-file /workspaces/MetaCodable/Sources/PluginCore/Variables/Type/Data/CodingKeysMap/Key.swift -primary-file /workspaces/MetaCodable/Sources/PluginCore/Variables/Type/Data/ConstraintGenerator.swift -primary-file /workspaces/MetaCodable/Sources/PluginCore/Variables/Type/Data/Registration.swift -primary-file /workspaces/MetaCodable/Sources/PluginCore/Variables/Type/EnumVariable.swift -primary-file /workspaces/MetaCodable/Sources/PluginCore/Variables/Type/MemberGroup.swift -primary-file /workspaces/MetaCodable/Sources/PluginCore/Variables/Type/TypeVariable.swift -primary-file /workspaces/MetaCodable/Sources/PluginCore/Variables/Variable.swift -supplementary-output-file-map /tmp/TemporaryDirectory.iG9e2S/supplementaryOutputs-2 -target x86_64-unknown-linux-gnu -disable-objc-interop -I /workspaces/MetaCodable/.build/plugins/tools/debug/Modules-tool -color-diagnostics -enable-testing -g -debug-info-format=dwarf -dwarf-version=4 -module-cache-path /workspaces/MetaCodable/.build/plugins/tools/debug/ModuleCache -swift-version 5 -Onone -D SWIFT_PACKAGE -D DEBUG -empty-abi-descriptor -resource-dir /usr/lib/swift -enable-anonymous-context-mangled-names -file-compilation-dir /workspaces/MetaCodable -Xcc -fPIC -Xcc -g -Xcc -fno-omit-frame-pointer -module-name PluginCore -package-name metacodable -plugin-path /usr/lib/swift/host/plugins -plugin-path /usr/local/lib/swift/host/plugins -parse-as-library -o /workspaces/MetaCodable/.build/plugins/tools/debug/PluginCore-tool.build/CodingKeysMap.swift.o -o /workspaces/MetaCodable/.build/plugins/tools/debug/PluginCore-tool.build/Key.swift.o -o /workspaces/MetaCodable/.build/plugins/tools/debug/PluginCore-tool.build/ConstraintGenerator.swift.o -o /workspaces/MetaCodable/.build/plugins/tools/debug/PluginCore-tool.build/Registration.swift.o -o /workspaces/MetaCodable/.build/plugins/tools/debug/PluginCore-tool.build/EnumVariable.swift.o -o /workspaces/MetaCodable/.build/plugins/tools/debug/PluginCore-tool.build/MemberGroup.swift.o -o /workspaces/MetaCodable/.build/plugins/tools/debug/PluginCore-tool.build/TypeVariable.swift.o -o /workspaces/MetaCodable/.build/plugins/tools/debug/PluginCore-tool.build/Variable.swift.o -index-store-path /workspaces/MetaCodable/.build/plugins/tools/debug/index/store -index-system-modules
1.      Swift version 6.0-dev (LLVM fc1036139c5e562, Swift 5bbf725fd958d34)
2.      Compiling with effective version 5.10
3.      While evaluating request IRGenRequest(IR Generation for file "/workspaces/MetaCodable/Sources/PluginCore/Variables/Type/MemberGroup.swift")
4.      While emitting witness table for protocol conformance MemberGroup<Decl>: DeclaredVariable at extension of MemberGroup (at /workspaces/MetaCodable/Sources/PluginCore/Variables/Type/MemberGroup.swift:160:1)
Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
0  swift-frontend 0x000055c6ced3ca37
1  swift-frontend 0x000055c6ced3a78e
2  swift-frontend 0x000055c6ced3d0aa
3  libc.so.6      0x000076ab49d2d520
4  libc.so.6      0x000076ab49d819fc pthread_kill + 300
5  libc.so.6      0x000076ab49d2d476 raise + 22
6  libc.so.6      0x000076ab49d137f3 abort + 211
7  swift-frontend 0x000055c6c9d91a90
8  swift-frontend 0x000055c6c9d91eca
9  swift-frontend 0x000055c6c9cca7eb
10 swift-frontend 0x000055c6c85e2c66
11 swift-frontend 0x000055c6c8694bfe
12 swift-frontend 0x000055c6c86943cb
13 swift-frontend 0x000055c6c8693b17
14 swift-frontend 0x000055c6c85e2236
15 swift-frontend 0x000055c6c85d4aeb
16 swift-frontend 0x000055c6c85e033c
17 swift-frontend 0x000055c6c849ebae
18 swift-frontend 0x000055c6c849d9c5
19 swift-frontend 0x000055c6c85642f7
20 swift-frontend 0x000055c6c8563d3b
21 swift-frontend 0x000055c6c8503e21
22 swift-frontend 0x000055c6c85e7145
23 swift-frontend 0x000055c6c85e588e
24 swift-frontend 0x000055c6c85d8e16
25 swift-frontend 0x000055c6c84fda8a
26 swift-frontend 0x000055c6c838b489
27 swift-frontend 0x000055c6c83fa853
28 swift-frontend 0x000055c6c83fa7a9
29 swift-frontend 0x000055c6c839590f
30 swift-frontend 0x000055c6c838ddac
31 swift-frontend 0x000055c6c7f4ac59
32 swift-frontend 0x000055c6c7f46274
33 swift-frontend 0x000055c6c7f44f4b
34 swift-frontend 0x000055c6c7f55ad5
35 swift-frontend 0x000055c6c7f482f7
36 swift-frontend 0x000055c6c7f4704a
37 swift-frontend 0x000055c6c7cfd18e
38 libc.so.6      0x000076ab49d14d90
39 libc.so.6      0x000076ab49d14e40 __libc_start_main + 128
40 swift-frontend 0x000055c6c7cfc235

Reproduction

################################################################
#                                                              #
# Swift Nightly Docker Image                                   #
# Tag: swift-6.0-DEVELOPMENT-SNAPSHOT-2024-09-11-a             #
#                                                              #
################################################################

Stack dump

0.      Program arguments: /usr/bin/swift-frontend -frontend -c /workspaces/MetaCodable/Sources/PluginCore/Attributes/AttributableDeclSyntax.swift /workspaces/MetaCodable/Sources/PluginCore/Attributes/Attribute.swift /workspaces/MetaCodable/Sources/PluginCore/Attributes/Codable/Codable+Expansion.swift /workspaces/MetaCodable/Sources/PluginCore/Attributes/Codable/Codable.swift /workspaces/MetaCodable/Sources/PluginCore/Attributes/Codable/CodingKeys/CodingKeyTransformer.swift /workspaces/MetaCodable/Sources/PluginCore/Attributes/Codable/CodingKeys/CodingKeys.swift /workspaces/MetaCodable/Sources/PluginCore/Attributes/Codable/CodingKeys/Strategy.swift /workspaces/MetaCodable/Sources/PluginCore/Attributes/Codable/IgnoreCodingInitialized.swift /workspaces/MetaCodable/Sources/PluginCore/Attributes/Codable/Inherits.swift /workspaces/MetaCodable/Sources/PluginCore/Attributes/Codable/UnTagged.swift /workspaces/MetaCodable/Sources/PluginCore/Attributes/CodedAs.swift /workspaces/MetaCodable/Sources/PluginCore/Attributes/CodedBy.swift /workspaces/MetaCodable/Sources/PluginCore/Attributes/Default.swift /workspaces/MetaCodable/Sources/PluginCore/Attributes/IgnoreCoding/IgnoreCoding.swift /workspaces/MetaCodable/Sources/PluginCore/Attributes/IgnoreCoding/IgnoreDecoding.swift /workspaces/MetaCodable/Sources/PluginCore/Attributes/IgnoreCoding/IgnoreEncoding.swift /workspaces/MetaCodable/Sources/PluginCore/Attributes/KeyPath/CodedAt.swift /workspaces/MetaCodable/Sources/PluginCore/Attributes/KeyPath/CodedIn.swift /workspaces/MetaCodable/Sources/PluginCore/Attributes/KeyPath/ContentAt.swift /workspaces/MetaCodable/Sources/PluginCore/Attributes/KeyPath/KeyPathProvider.swift /workspaces/MetaCodable/Sources/PluginCore/Attributes/MemberInit/MemberInit+Expansion.swift /workspaces/MetaCodable/Sources/PluginCore/Attributes/MemberInit/MemberInit.swift /workspaces/MetaCodable/Sources/PluginCore/Attributes/PeerAttribute.swift /workspaces/MetaCodable/Sources/PluginCore/Diagnostics/AggregatedDiagnosticProducer.swift /workspaces/MetaCodable/Sources/PluginCore/Diagnostics/CombinedUsage.swift /workspaces/MetaCodable/Sources/PluginCore/Diagnostics/Condition/ArgumentCountCondition.swift /workspaces/MetaCodable/Sources/PluginCore/Diagnostics/Condition/DeclarationCondition.swift /workspaces/MetaCodable/Sources/PluginCore/Diagnostics/Condition/DiagnosticCondition.swift /workspaces/MetaCodable/Sources/PluginCore/Diagnostics/ConditionalDiagnosticProducer.swift /workspaces/MetaCodable/Sources/PluginCore/Diagnostics/DiagnosticProducer.swift /workspaces/MetaCodable/Sources/PluginCore/Diagnostics/DuplicateUsage.swift /workspaces/MetaCodable/Sources/PluginCore/Diagnostics/GroupedVariableDeclaration.swift /workspaces/MetaCodable/Sources/PluginCore/Diagnostics/InvalidCombination.swift /workspaces/MetaCodable/Sources/PluginCore/Diagnostics/InvalidDeclaration.swift /workspaces/MetaCodable/Sources/PluginCore/Diagnostics/MetaCodableMessage.swift /workspaces/MetaCodable/Sources/PluginCore/Diagnostics/StaticVariableDeclaration.swift /workspaces/MetaCodable/Sources/PluginCore/Diagnostics/UninitializedVariableDecl.swift /workspaces/MetaCodable/Sources/PluginCore/Expansion/AttributeExpander.swift /workspaces/MetaCodable/Sources/PluginCore/Expansion/Options/DeclModifiersGenerator.swift /workspaces/MetaCodable/Sources/PluginCore/Expansion/Options/Options.swift /workspaces/MetaCodable/Sources/PluginCore/Variables/ComposedVariable.swift /workspaces/MetaCodable/Sources/PluginCore/Variables/ConditionalCodingVariable.swift /workspaces/MetaCodable/Sources/PluginCore/Variables/Enum/Case/Associated/AssociatedVariable.swift /workspaces/MetaCodable/Sources/PluginCore/Variables/Enum/Case/Associated/BasicAssociatedVariable.swift /workspaces/MetaCodable/Sources/PluginCore/Variables/Enum/Case/BasicEnumCaseVariable.swift /workspaces/MetaCodable/Sources/PluginCore/Variables/Enum/Case/EnumCaseVariable.swift /workspaces/MetaCodable/Sources/PluginCore/Variables/Enum/Switcher/AdjacentlyTaggableSwitcher.swift /workspaces/MetaCodable/Sources/PluginCore/Variables/Enum/Switcher/AdjacentlyTaggedEnumSwitcher.swift /workspaces/MetaCodable/Sources/PluginCore/Variables/Enum/Switcher/AnyEnumSwitcher.swift /workspaces/MetaCodable/Sources/PluginCore/Variables/Enum/Switcher/EnumSwitcherVariable.swift /workspaces/MetaCodable/Sources/PluginCore/Variables/Enum/Switcher/ExternallyTaggedEnumSwitcher.swift /workspaces/MetaCodable/Sources/PluginCore/Variables/Enum/Switcher/InternallyTaggedEnumSwitcher.swift /workspaces/MetaCodable/Sources/PluginCore/Variables/Enum/Switcher/TaggedEnumSwitcherVariable.swift /workspaces/MetaCodable/Sources/PluginCore/Variables/Enum/Switcher/UnTaggedEnumSwitcher.swift /workspaces/MetaCodable/Sources/PluginCore/Variables/Initialization/AnyInitialization.swift /workspaces/MetaCodable/Sources/PluginCore/Variables/Initialization/AnyRequiredVariableInitialization.swift /workspaces/MetaCodable/Sources/PluginCore/Variables/Initialization/IgnoredInitialization.swift /workspaces/MetaCodable/Sources/PluginCore/Variables/Initialization/MemberwiseInitGenerator.swift /workspaces/MetaCodable/Sources/PluginCore/Variables/Initialization/OptionalInitialization.swift /workspaces/MetaCodable/Sources/PluginCore/Variables/Initialization/RequiredInitialization.swift /workspaces/MetaCodable/Sources/PluginCore/Variables/Initialization/RequiredInitializationWithDefaultValue.swift /workspaces/MetaCodable/Sources/PluginCore/Variables/Initialization/RequiredVariableInitialization.swift /workspaces/MetaCodable/Sources/PluginCore/Variables/Initialization/VariableInitialization.swift /workspaces/MetaCodable/Sources/PluginCore/Variables/Property/AliasedPropertyVariable.swift /workspaces/MetaCodable/Sources/PluginCore/Variables/Property/AnyPropertyVariable.swift /workspaces/MetaCodable/Sources/PluginCore/Variables/Property/BasicPropertyVariable.swift /workspaces/MetaCodable/Sources/PluginCore/Variables/Property/Data/DecodingFallback.swift /workspaces/MetaCodable/Sources/PluginCore/Variables/Property/DefaultValueVariable.swift /workspaces/MetaCodable/Sources/PluginCore/Variables/Property/HelperCodedVariable.swift /workspaces/MetaCodable/Sources/PluginCore/Variables/Property/InitializationVariable.swift /workspaces/MetaCodable/Sources/PluginCore/Variables/Property/KeyedVariable.swift /workspaces/MetaCodable/Sources/PluginCore/Variables/Property/PropertyVariable.swift /workspaces/MetaCodable/Sources/PluginCore/Variables/Property/Tree/PropertyVariableTreeNode+CodingData.swift /workspaces/MetaCodable/Sources/PluginCore/Variables/Property/Tree/PropertyVariableTreeNode+CodingLocation.swift /workspaces/MetaCodable/Sources/PluginCore/Variables/Property/Tree/PropertyVariableTreeNode+Generated.swift /workspaces/MetaCodable/Sources/PluginCore/Variables/Property/Tree/PropertyVariableTreeNode.swift /workspaces/MetaCodable/Sources/PluginCore/Variables/Syntax/AssociatedDeclSyntax.swift /workspaces/MetaCodable/Sources/PluginCore/Variables/Syntax/EnumCaseVariableDeclSyntax.swift /workspaces/MetaCodable/Sources/PluginCore/Variables/Syntax/MemberGroupSyntax.swift /workspaces/MetaCodable/Sources/PluginCore/Variables/Syntax/PropertyDeclSyntax.swift /workspaces/MetaCodable/Sources/PluginCore/Variables/Syntax/VariableSyntax.swift /workspaces/MetaCodable/Sources/PluginCore/Variables/Type/ActorVariable.swift /workspaces/MetaCodable/Sources/PluginCore/Variables/Type/ClassVariable.swift /workspaces/MetaCodable/Sources/PluginCore/Variables/Type/Data/CodingKeysMap/Case.swift -primary-file /workspaces/MetaCodable/Sources/PluginCore/Variables/Type/Data/CodingKeysMap/CodingKeysMap.swift -primary-file /workspaces/MetaCodable/Sources/PluginCore/Variables/Type/Data/CodingKeysMap/Key.swift -primary-file /workspaces/MetaCodable/Sources/PluginCore/Variables/Type/Data/ConstraintGenerator.swift -primary-file /workspaces/MetaCodable/Sources/PluginCore/Variables/Type/Data/Registration.swift -primary-file /workspaces/MetaCodable/Sources/PluginCore/Variables/Type/EnumVariable.swift -primary-file /workspaces/MetaCodable/Sources/PluginCore/Variables/Type/MemberGroup.swift -primary-file /workspaces/MetaCodable/Sources/PluginCore/Variables/Type/TypeVariable.swift -primary-file /workspaces/MetaCodable/Sources/PluginCore/Variables/Variable.swift -supplementary-output-file-map /tmp/TemporaryDirectory.iG9e2S/supplementaryOutputs-2 -target x86_64-unknown-linux-gnu -disable-objc-interop -I /workspaces/MetaCodable/.build/plugins/tools/debug/Modules-tool -color-diagnostics -enable-testing -g -debug-info-format=dwarf -dwarf-version=4 -module-cache-path /workspaces/MetaCodable/.build/plugins/tools/debug/ModuleCache -swift-version 5 -Onone -D SWIFT_PACKAGE -D DEBUG -empty-abi-descriptor -resource-dir /usr/lib/swift -enable-anonymous-context-mangled-names -file-compilation-dir /workspaces/MetaCodable -Xcc -fPIC -Xcc -g -Xcc -fno-omit-frame-pointer -module-name PluginCore -package-name metacodable -plugin-path /usr/lib/swift/host/plugins -plugin-path /usr/local/lib/swift/host/plugins -parse-as-library -o /workspaces/MetaCodable/.build/plugins/tools/debug/PluginCore-tool.build/CodingKeysMap.swift.o -o /workspaces/MetaCodable/.build/plugins/tools/debug/PluginCore-tool.build/Key.swift.o -o /workspaces/MetaCodable/.build/plugins/tools/debug/PluginCore-tool.build/ConstraintGenerator.swift.o -o /workspaces/MetaCodable/.build/plugins/tools/debug/PluginCore-tool.build/Registration.swift.o -o /workspaces/MetaCodable/.build/plugins/tools/debug/PluginCore-tool.build/EnumVariable.swift.o -o /workspaces/MetaCodable/.build/plugins/tools/debug/PluginCore-tool.build/MemberGroup.swift.o -o /workspaces/MetaCodable/.build/plugins/tools/debug/PluginCore-tool.build/TypeVariable.swift.o -o /workspaces/MetaCodable/.build/plugins/tools/debug/PluginCore-tool.build/Variable.swift.o -index-store-path /workspaces/MetaCodable/.build/plugins/tools/debug/index/store -index-system-modules
1.      Swift version 6.0-dev (LLVM fc1036139c5e562, Swift 5bbf725fd958d34)
2.      Compiling with effective version 5.10
3.      While evaluating request IRGenRequest(IR Generation for file "/workspaces/MetaCodable/Sources/PluginCore/Variables/Type/MemberGroup.swift")
4.      While emitting witness table for protocol conformance MemberGroup<Decl>: DeclaredVariable at extension of MemberGroup (at /workspaces/MetaCodable/Sources/PluginCore/Variables/Type/MemberGroup.swift:160:1)
Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
0  swift-frontend 0x000055c6ced3ca37
1  swift-frontend 0x000055c6ced3a78e
2  swift-frontend 0x000055c6ced3d0aa
3  libc.so.6      0x000076ab49d2d520
4  libc.so.6      0x000076ab49d819fc pthread_kill + 300
5  libc.so.6      0x000076ab49d2d476 raise + 22
6  libc.so.6      0x000076ab49d137f3 abort + 211
7  swift-frontend 0x000055c6c9d91a90
8  swift-frontend 0x000055c6c9d91eca
9  swift-frontend 0x000055c6c9cca7eb
10 swift-frontend 0x000055c6c85e2c66
11 swift-frontend 0x000055c6c8694bfe
12 swift-frontend 0x000055c6c86943cb
13 swift-frontend 0x000055c6c8693b17
14 swift-frontend 0x000055c6c85e2236
15 swift-frontend 0x000055c6c85d4aeb
16 swift-frontend 0x000055c6c85e033c
17 swift-frontend 0x000055c6c849ebae
18 swift-frontend 0x000055c6c849d9c5
19 swift-frontend 0x000055c6c85642f7
20 swift-frontend 0x000055c6c8563d3b
21 swift-frontend 0x000055c6c8503e21
22 swift-frontend 0x000055c6c85e7145
23 swift-frontend 0x000055c6c85e588e
24 swift-frontend 0x000055c6c85d8e16
25 swift-frontend 0x000055c6c84fda8a
26 swift-frontend 0x000055c6c838b489
27 swift-frontend 0x000055c6c83fa853
28 swift-frontend 0x000055c6c83fa7a9
29 swift-frontend 0x000055c6c839590f
30 swift-frontend 0x000055c6c838ddac
31 swift-frontend 0x000055c6c7f4ac59
32 swift-frontend 0x000055c6c7f46274
33 swift-frontend 0x000055c6c7f44f4b
34 swift-frontend 0x000055c6c7f55ad5
35 swift-frontend 0x000055c6c7f482f7
36 swift-frontend 0x000055c6c7f4704a
37 swift-frontend 0x000055c6c7cfd18e
38 libc.so.6      0x000076ab49d14d90
39 libc.so.6      0x000076ab49d14e40 __libc_start_main + 128
40 swift-frontend 0x000055c6c7cfc235

Expected behavior

Code should compile.

Environment

Swift version 6.0-dev (LLVM fc1036139c5e562, Swift 5bbf725fd958d34) Target: x86_64-unknown-linux-gnu

Additional information

No response

slavapestov commented 1 month ago

Minimal test case:

public struct G<T> where T: P1, T.A: P1, T.A.A: P1 {}

public protocol P1 {
  associatedtype A
}

extension Int: P1 {
  public typealias A = Int
}

public protocol P2 {
  func f()
}

extension G: P2 where T.A == Int {
  public func f() {}
}
slavapestov commented 1 month ago

This is actually not a regression in 6.0, it's just that the verification check is disabled in noassert builds. There's a larger refactoring that needs to happen at some point to define away this problem, but for now I'm going to land a narrower fix.

soumyamahunt commented 1 month ago

@slavapestov will this fix land on Swift 6 general release or in 6.1?