mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
15 lines
231 B
Swift
15 lines
231 B
Swift
// RUN: %target-typecheck-verify-swift
|
|
|
|
struct S<A> {
|
|
let v:any P<A>
|
|
func map<B> (_ f:(A) -> B) -> S<B> {
|
|
v.map(f).k()
|
|
}
|
|
}
|
|
|
|
protocol P<A> {
|
|
associatedtype A
|
|
func map<D> (_ g:(A) -> D) -> any P<D>
|
|
func k() -> S<A>
|
|
}
|