mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
They're not used inside the thunk so it's a waste passing them in, and if they involve private types from a different translation unit we will get a linking error from referencing the metadata accessor function. Fixes the test case in <rdar://problem/39470607>, but the more general problem remains.
19 lines
506 B
Swift
19 lines
506 B
Swift
// RUN: %empty-directory(%t)
|
|
// RUN: %target-build-swift -emit-library -module-name outlined_thunks %S/Inputs/outlined-thunks-other.swift %s
|
|
// RUN: %target-build-swift -emit-library -module-name outlined_thunks -whole-module-optimization %S/Inputs/outlined-thunks-other.swift %s
|
|
|
|
// rdar://problem/39470607
|
|
|
|
protocol P { }
|
|
|
|
private struct MyPrivate<T: P> {
|
|
private var otherHelper: OtherInternal<T>? = nil
|
|
init(_: T) { }
|
|
}
|
|
|
|
extension P {
|
|
func foo(data: Any) {
|
|
_ = MyPrivate(data as! Self)
|
|
}
|
|
}
|