mirror of
https://github.com/apple/swift.git
synced 2026-03-04 18:24:35 +01:00
20 lines
667 B
Swift
20 lines
667 B
Swift
func simple(completion: (String?, Error?) -> Void) { }
|
|
|
|
func mismatches() {
|
|
// RUN: not %refactor -convert-call-to-async-alternative -dump-text -source-filename %s -pos=%(line+1):3
|
|
simple()
|
|
|
|
// RUN: not %refactor -convert-call-to-async-alternative -dump-text -source-filename %s -pos=%(line+1):3
|
|
simple(10) { res, err in
|
|
print("call mismatch")
|
|
}
|
|
|
|
// RUN: not %refactor -convert-call-to-async-alternative -dump-text -source-filename %s -pos=%(line+1):3
|
|
simple { res in
|
|
print("closure mismatch")
|
|
}
|
|
}
|
|
|
|
// RUN: not %refactor -add-async-alternative -dump-text -source-filename %s -pos=%(line+1):1
|
|
func missingBody(complete: (Int?, Error?) -> Void)
|