Files
swift-mirror/validation-test/compiler_crashers_2_fixed/0095-rdar30154791.swift
2017-05-11 09:31:58 -07:00

36 lines
457 B
Swift

// RUN: not %target-swift-frontend %s -typecheck
struct X<T> {}
struct Y<T> {}
protocol P {
associatedtype T = X<U>
associatedtype U
func foo() -> T
}
protocol Q: P {
func bar() -> T
func bas() -> U
}
extension P {
func foo() -> X<U> { fatalError() }
}
extension Q {
func foo() -> Y<U> { fatalError() }
func bar() -> Y<U> { fatalError() }
}
struct S {}
extension S {
func bas() -> Int {}
}
extension S: Q {}
let x: Y = S().foo()