Skip to content

Commit 68d7b5a

Browse files
authored
Merge pull request #79643 from hamishknight/add-test-case
[test] Add test case for rdar://126583098
2 parents 2e5181f + eb12e4e commit 68d7b5a

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)