Files
swift-mirror/validation-test/compiler_crashers_fixed/0095-rdar30154791.swift
Hamish Knight 4e811c3a88 [test] Merge crasher directories
There is no longer much of a good reason to keep these separate,
merge them.
2025-10-18 12:51:30 +01: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()