mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
20 lines
272 B
Swift
20 lines
272 B
Swift
// RUN: %target-swift-frontend -typecheck %s
|
|
|
|
// https://github.com/apple/swift/issues/55955
|
|
|
|
class Class: P {
|
|
typealias A = Bool
|
|
}
|
|
|
|
protocol P {
|
|
associatedtype A
|
|
}
|
|
|
|
protocol Q : P {
|
|
func takesA(arg: A)
|
|
}
|
|
|
|
func test<T: Class & Q>(arg: T) {
|
|
arg.takesA(arg: true)
|
|
}
|