// RUN: %target-swift-frontend -dump-ast %s | %FileCheck %s protocol P { associatedtype A @Builder var x1: [S] { get } @Builder var x2: [S] { get } } @resultBuilder enum Builder { static func buildBlock(_ args: S...) -> [S] { args } } struct S {} // CHECK: struct_decl{{.*}}ProtocolSubstitution struct ProtocolSubstitution: P { typealias A = Int // CHECK: var_decl{{.*}}x1 // CHECK: Builder.buildBlock{{.*}}(substitution_map generic_signature= (substitution T -> Int)) var x1: [S] { S() } // CHECK: var_decl{{.*}}x2 // CHECK: Builder.buildBlock{{.*}}(substitution_map generic_signature= (substitution T -> ProtocolSubstitution)) var x2: [S] { S() } } // CHECK: struct_decl{{.*}}ArchetypeSubstitution struct ArchetypeSubstitution: P { // CHECK: var_decl{{.*}}x1 // CHECK: Builder.buildBlock{{.*}}(substitution_map generic_signature= (substitution T -> A)) var x1: [S] { S() } // CHECK: var_decl{{.*}}x2 // CHECK: Builder.buildBlock{{.*}}(substitution_map generic_signature= (substitution T -> ArchetypeSubstitution)) var x2: [S] { S() } } // CHECK-LABEL: struct_decl{{.*}}ExplicitGenericAttribute struct ExplicitGenericAttribute { // CHECK: var_decl{{.*}}x1 // CHECK: Builder.buildBlock{{.*}}(substitution_map generic_signature= (substitution T -> T)) @Builder var x1: [S] { S() } // CHECK: var_decl{{.*}}x2 // CHECK: Builder.buildBlock{{.*}}(substitution_map generic_signature= (substitution T -> T.A)) @Builder var x2: [S] { S() } } // CHECK: struct_decl{{.*}}ConcreteTypeSubstitution struct ConcreteTypeSubstitution {} extension ConcreteTypeSubstitution: P where Value == Int { typealias A = Value // CHECK: var_decl{{.*}}x1 // CHECK: Builder.buildBlock{{.*}}(substitution_map generic_signature= (substitution T -> Int)) var x1: [S] { S() } // CHECK: var_decl{{.*}}x2 // CHECK: Builder.buildBlock{{.*}}(substitution_map generic_signature= (substitution T -> ConcreteTypeSubstitution)) var x2: [S] { S() } }