Files
swift-mirror/validation-test/compiler_crashers_2_fixed/0035-rdar22003613.swift
David Farler b7d17b25ba Rename -parse flag to -typecheck
A parse-only option is needed for parse performance tracking and the
current option also includes semantic analysis.
2016-11-28 10:50:55 -08:00

29 lines
451 B
Swift

// RUN: not %target-swift-frontend %s -typecheck
class CFArray {}
struct U<T> {}
func yyy<T, Result>(arg: inout T, _ body: U<T> -> Result) -> Result {
return body(U<T>())
}
enum YYY: Int, OptionSet {
case A = 1
init(rawValue: Int) {
self = .A
}
}
func XXX(flags: YYY, _ outItems: U<CFArray?>) -> Int
{
return 0
}
func f() {
var importArray: CFArray? = nil
yyy(&importArray) { importArrayPtr in
XXX(0, importArrayPtr)
}
}