Files
swift-mirror/test/refactoring/ConvertAsync/errors.swift
2021-02-05 15:32:35 +10:00

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)