mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Selectively revert 36683a804c to resolve
a source compatibility regression. See inline comment for use case. We
are going to consider acknowledging this use case in the rules in a
future release.
12 lines
205 B
Swift
12 lines
205 B
Swift
// RUN: %target-typecheck-verify-swift -target %target-swift-5.9-abi-triple
|
|
|
|
do {
|
|
protocol P {}
|
|
struct S<each T> {}
|
|
|
|
func foo<T: P>(_: T, _: Optional<S<T>> = nil) {}
|
|
|
|
let p: any P
|
|
foo(p) // OK
|
|
}
|