mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
A parse-only option is needed for parse performance tracking and the current option also includes semantic analysis.
29 lines
451 B
Swift
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)
|
|
}
|
|
}
|