File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed
validation-test/compiler_crashers_2_fixed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change 1+ // RUN: %target-swift-frontend -emit-ir %s -disable-availability-checking
2+
3+ public protocol SomeObject { }
4+
5+ public struct VariadicObjectBox < each S : SomeObject > {
6+ public let object : ( repeat each S )
7+ }
8+
9+ @resultBuilder
10+ public struct VariadicObjectBoxBuilder {
11+ public static func buildBlock< each S : SomeObject > ( _ object: ( repeat each S ) ) -> VariadicObjectBox < repeat each S > {
12+ VariadicObjectBox ( object: ( repeat each object) )
13+ }
14+ }
15+
16+ public struct ObjectContainer {
17+ public init < each S : SomeObject > ( box: VariadicObjectBox < repeat each S > ) {
18+ // This init compiles
19+ }
20+
21+ public init < each S : SomeObject > ( @VariadicObjectBoxBuilder _ builder: ( ) -> VariadicObjectBox < repeat each S > ) {
22+ // This init crashes on compilation
23+ }
24+ }
You can’t perform that action at this time.
0 commit comments