mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
28 lines
403 B
Swift
28 lines
403 B
Swift
// RUN: %target-swift-frontend %s -emit-ir -o /dev/null
|
|
|
|
protocol P {
|
|
static var name: String { get }
|
|
init(i:Int)
|
|
}
|
|
|
|
class A: P {
|
|
class var name: String {
|
|
get { return "A" }
|
|
}
|
|
required init(i:Int) {}
|
|
}
|
|
class B: P {
|
|
class var name: String {
|
|
get { return "A" }
|
|
}
|
|
required init(i:Int) {}
|
|
}
|
|
|
|
let cls:P.Type = A.self
|
|
|
|
let p:P = cls.init(i:1)
|
|
|
|
func markUsed<T>(_ t: T) {}
|
|
markUsed(p)
|
|
|