Files
swift-mirror/test/ParseableInterface/Inputs/ConformancesUser.swift
Jordan Rose 81bcf9d5d6 Revert "[ParseableInterfaces] Skip value witnesses of resilient conformances" (#20637)
This reverts commit 61dd307b3b,
the effective part of #20419.

rdar://problem/43824088
2018-11-16 11:21:14 -08:00

30 lines
609 B
Swift

import Conformances
func testGeneric<T: MyProto>(_: T.Type) -> Int {
var impl = T.init()
impl.method()
impl.prop = 0
return impl[0]
}
public func testFull() -> Int {
return testGeneric(FullStructImpl.self)
}
public func testOpaque() -> Int {
return testGeneric(OpaqueStructImpl.self)
}
func testOptionalGeneric<T: OptionalReqs>(_ obj: T) -> Bool {
return obj.method?() != nil
}
public func testOptionalPresent(_ obj: OptionalReqsPresent) -> Bool {
return testOptionalGeneric(obj)
}
public func testOptionalAbsent(_ obj: OptionalReqsAbsent) -> Bool {
return testOptionalGeneric(obj)
}