Files
swift-mirror/test/Interpreter/SDK/objc_block_generic.swift
2016-08-10 23:52:02 -07:00

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))
}