mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +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
285 B
Swift
15 lines
285 B
Swift
// RUN: %target-swiftc_driver -Xfrontend -disable-availability-checking -emit-module %s
|
|
|
|
// rdar://problem/49829836
|
|
|
|
public protocol P {
|
|
associatedtype Assoc: Collection
|
|
func foo() -> Assoc
|
|
}
|
|
|
|
public struct S : P {
|
|
public func foo() -> some Collection {
|
|
return [1,2,3]
|
|
}
|
|
}
|