Files
swift-mirror/validation-test/Serialization/rdar40899824.swift
Jordan Rose f1b347c0cc Handle non-deserializable SIL functions referenced in witness tables
This is enough to let the test case in rdar://problem/40899824 pass,
and any callers of this function already need to be able to handle a
nullptr result. There's a lot more work to do in this area, but it's
nice to get the simple things working again.
2018-06-27 17:24:22 -07:00

39 lines
1.0 KiB
Swift

// RUN: %empty-directory(%t)
// RUN: %target-build-swift %s -emit-module -o %t/Library.swiftmodule -I %S/Inputs/custom-modules -DLIBRARY -Xfrontend -enable-objc-interop -Xfrontend -disable-objc-attr-requires-foundation-module
// RUN: %target-swift-frontend %s -I %t -I %S/Inputs/custom-modules -enable-objc-interop -emit-ir > /dev/null
// RUN: %target-swift-frontend %s -I %t -I %S/Inputs/custom-modules -enable-objc-interop -emit-ir -Xcc -DBAD > /dev/null
// RUN: %target-swift-frontend %s -I %t -I %S/Inputs/custom-modules -enable-objc-interop -emit-ir -Xcc -DBAD -O > /dev/null
#if LIBRARY
import rdar40899824Helper
public protocol Proto: class {
func use(_: SoonToBeMissing)
func unrelated()
}
extension Impl: Proto {}
#else // LIBRARY
import Library
import rdar40899824Helper
func testGeneric<T: Proto>(_ obj: T) {
obj.unrelated()
}
func testExistential(_ obj: Proto) {
obj.unrelated()
}
func test(_ proto: Proto, _ impl: Impl) {
impl.unrelated()
testGeneric(impl)
testExistential(impl)
}
#endif // LIBRARY