Skip to content

Commit eb12e4e

Browse files
committed
[test] Add test case for rdar://126583098
1 parent c6d1060 commit eb12e4e

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

test/Constraints/rdar126583098.swift

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// RUN: %target-swift-emit-silgen %s -verify
2+
3+
protocol P {
4+
var d: Double? { get }
5+
}
6+
7+
// rdar://126583098 - Make sure this compiles.
8+
func foo<each S: Sequence>(_ xss: (repeat (each S))) where repeat (each S).Element: P {
9+
var n: Double = 0
10+
for xs in repeat each xss {
11+
for x in xs {
12+
n += x.d ?? 0
13+
}
14+
}
15+
}

0 commit comments

Comments
 (0)