mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Check the availability of decls that declare an opaque return type to ensure they deploy to a runtime that supports opaque types. rdar://problem/50731151
15 lines
274 B
Swift
15 lines
274 B
Swift
// RUN: %target-swift-frontend -disable-availability-checking -emit-ir -o /dev/null %s
|
|
|
|
protocol P {
|
|
associatedtype AT
|
|
func foo() -> AT
|
|
}
|
|
|
|
struct X<C1: Collection, C2: Collection, T>: P
|
|
where C1.Element == C2.Element
|
|
{
|
|
func foo() -> some P {
|
|
return self
|
|
}
|
|
}
|