blob: 6b743b0f5b094d325145dd45a3a91a79a26cd7bd [file] [log] [blame]
// RUN: %target-typecheck-verify-swift
protocol Empty {}
protocol P {
associatedtype Element
init()
}
struct A<T> : P {
typealias Element = T
}
struct A1<T> : P {
typealias Element = T
}
struct A2<T> : P {
typealias Element = T
}
func toA<S: Empty, AT:P>(_ s: S) -> AT where AT.Element == S.Generator.Element { // expected-error{{'Generator' is not a member type of 'S'}}
return AT()
}