Avatar
swiftbot BOT 6/20/2018 5:32 AM
Author icon
kateinoigakukun
protocol P { associatedtype T1 } protocol HasT2 { associatedtype T2 } struct A<T>: P { typealias T1 = T } extension A: HasT2 where T == Int { typealias T2 = String } func f<A: HasT2>(_ a: A.Type) {} f(A<String>.self)
Version:
swift-4.1.1-RELEASE
Output:
Error:
/usercode/main.swift:15:1: error: 'String' is not convertible to 'Int' f(A<String>.self) ^