mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
20 lines
288 B
Swift
20 lines
288 B
Swift
// RUN: %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)
|
|
}
|