Files
swift-mirror/test/Interpreter/SDK/objc_block_generic.swift
Jordan Rose b6818046a8 Eliminate optimization levels 0-3 in favor of -Onone/-O/-Ofast.
We were already effectively doing this everywhere /except/ when building
the standard library (which used -O2), so just use the model we want going
forward.

Swift SVN r20455
2014-07-24 01:12:59 +00:00

15 lines
315 B
Swift

// RUN: %target-run-simple-swift | FileCheck %s
import Foundation
autoreleasepool {
let f: @objc_block Int -> Int = { $0 }
// In an -Onone build this instantiates the generic metadata for
// @objc_block Int -> Int
let ff: (@objc_block Int -> Int)? = f
let gg = ff
// CHECK: 219
println(gg!(219))
}