mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Augment test/SILGen/objc_imported_generic.swift to ensure it gets through IRGen.
The crashing cases all appear to work now thanks to some help from @rjmccall, except for an IRGen issue with providing dependent associated type metadata for protocol witness thunks (rdar://problem/26602097).
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-silgen %s | FileCheck %s
|
||||
// For integration testing, ensure we get through IRGen too.
|
||||
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-ir -verify -DIRGEN_INTEGRATION_TEST %s
|
||||
|
||||
// REQUIRES: objc_interop
|
||||
|
||||
import objc_generics
|
||||
@@ -54,7 +57,13 @@ protocol ThingHolder {
|
||||
var propertyArrayOfThings: [Thing]? { get set }
|
||||
}
|
||||
|
||||
// TODO: Crashes in IRGen because the type metadata for `T` is not found in
|
||||
// the witness thunk to satisfy the associated type requirement. This could be
|
||||
// addressed by teaching IRGen to fulfill erased type parameters from protocol
|
||||
// witness tables (rdar://problem/26602097).
|
||||
#if !IRGEN_INTEGRATION_TEST
|
||||
extension GenericClass: ThingHolder {}
|
||||
#endif
|
||||
|
||||
public func genericBlockBridging<T: AnyObject>(x: GenericClass<T>) {
|
||||
let block = x.blockForPerformingOnThings()
|
||||
|
||||
Reference in New Issue
Block a user