mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
24 lines
592 B
Swift
24 lines
592 B
Swift
// RUN: %target-swift-frontend -emit-silgen %s | %FileCheck %s
|
|
|
|
struct S {}
|
|
|
|
func noescape_concrete(_ x: (S) -> S) {
|
|
noescape_generic(x)
|
|
}
|
|
|
|
func noescape_generic<T>(_ x: (T) -> T) {
|
|
}
|
|
|
|
// CHECK-LABEL: sil hidden @_T022noescape_reabstraction0A9_concreteyAA1SVADcF
|
|
// CHECK: function_ref [[REABSTRACTION_THUNK:@_T022noescape_reabstraction1SVACIxyd_A2CIxir_TR]]
|
|
|
|
func concrete(_ x: (S) -> S) {
|
|
noescape_generic(x)
|
|
}
|
|
|
|
func generic<T>(_ x: (T) -> T) {
|
|
}
|
|
|
|
// CHECK-LABEL: sil hidden @_T022noescape_reabstraction8concreteyAA1SVADcF
|
|
// CHECK: function_ref [[REABSTRACTION_THUNK]]
|