Skip to content

Commit b741299

Browse files
authored
Merge pull request #67794 from slavapestov/testcase-rdar113492450
Regression test for rdar://problem/113492450
2 parents d240ffa + 4ebbb60 commit b741299

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
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+
}

0 commit comments

Comments
 (0)