Files
swift-mirror/test/SILGen/rdar126583098.swift
2025-02-27 09:29:34 +00:00

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
}
}
}