mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
18 lines
395 B
Swift
18 lines
395 B
Swift
// RUN: %target-run-simple-swift | %FileCheck %s
|
|
// REQUIRES: executable_test
|
|
|
|
// REQUIRES: objc_interop
|
|
|
|
import Foundation
|
|
|
|
autoreleasepool {
|
|
let f: @convention(block) (Int) -> Int = { $0 }
|
|
// In an -Onone build this instantiates the generic metadata for
|
|
// @convention(block) Int -> Int
|
|
let ff: (@convention(block) (Int) -> Int)? = f
|
|
let gg = ff
|
|
|
|
// CHECK: 219
|
|
print(gg!(219))
|
|
}
|