mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
27 lines
401 B
Swift
27 lines
401 B
Swift
// RUN: %target-run-simple-swift
|
|
// REQUIRES: executable_test
|
|
// REQUIRES: objc_interop
|
|
|
|
import StdlibUnittest
|
|
import Foundation
|
|
|
|
@objc protocol Horse {
|
|
init()
|
|
}
|
|
|
|
class Pony : Horse {
|
|
let x = LifetimeTracked(0)
|
|
|
|
required init() {}
|
|
}
|
|
|
|
var ObjCProtocolsTest = TestSuite("ObjCProtocols")
|
|
|
|
ObjCProtocolsTest.test("InitRequirement") {
|
|
let t: Horse.Type = Pony.self
|
|
|
|
_ = t.init()
|
|
}
|
|
|
|
runAllTests()
|