mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
16 lines
322 B
Swift
16 lines
322 B
Swift
// RUN: %target-swift-emit-silgen %s -verify
|
|
|
|
protocol P {
|
|
var d: Double? { get }
|
|
}
|
|
|
|
// rdar://126583098 - Make sure this compiles.
|
|
func foo<each S: Sequence>(_ xss: (repeat (each S))) where repeat (each S).Element: P {
|
|
var n: Double = 0
|
|
for xs in repeat each xss {
|
|
for x in xs {
|
|
n += x.d ?? 0
|
|
}
|
|
}
|
|
}
|