mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
We want to validate both type in same-type or conformance constraints, even when the first type is ill-formed, so we don't leave null types around for later phases to crash on. Fixes rdar://problem/31093854.
20 lines
292 B
Swift
20 lines
292 B
Swift
// RUN: not %target-swift-frontend -swift-version 4 %s -typecheck -o /dev/null
|
|
|
|
// This should actually type check successfully.
|
|
|
|
protocol P {
|
|
associatedtype T
|
|
}
|
|
|
|
protocol Q1 : P {
|
|
typealias T = Int
|
|
|
|
func f(_: T)
|
|
}
|
|
|
|
protocol Q2 : P {
|
|
associatedtype T where T == Int
|
|
|
|
func f(_: T)
|
|
}
|