 // NON-OPTIONAL-RESULT-AND-NIL-ERROR-NEXT:   return "abc"
 // NON-OPTIONAL-RESULT-AND-NIL-ERROR-NEXT: }
 
-// RUN: %refactor -convert-to-async -dump-text -source-filename %s -pos=%(line+1):1 | %FileCheck -check-prefix=NON-OPTIONAL-RESULT-AND-OPTIONAL-RELAYED-ERROR %s
+// RUN: %refactor-check-compiles -convert-to-async -dump-text -source-filename %s -pos=%(line+1):1 | %FileCheck -check-prefix=NON-OPTIONAL-RESULT-AND-OPTIONAL-RELAYED-ERROR %s
 func nonOptionalResultAndOptionalRelayedError(completion: @escaping (String?, Error?) -> Void) {
   simpleErr(arg: "test") { (res, err) in
     completion("abc", err)


// In this case, we are previously ignoring the error returned from simpleErr but are rethrowing it in the refactored case.
// That's probably fine although it changes semantics.
// RUN: %refactor -convert-to-async -dump-text -source-filename %s -pos=%(line+1):1 | %FileCheck -check-prefix=OPTIONAL-RELAYED-RESULT-AND-NIL-ERROR %s
func optionalRelayedResultAndNilError(completion: @escaping (String?, Error?) -> Void) {
  simpleErr(arg: "test") { (res, err) in
    completion(res, nil)

// RETURN-HANDLING4-NEXT:   }
// RETURN-HANDLING4-NEXT: }

// RUN: %refactor-check-compiles -convert-to-async -dump-text -source-filename %s -pos=%(line+1):1 | %FileCheck -check-prefix=RDAR78693050 %s
func rdar78693050(_ completion: @escaping () -> Void) {
  simple { str in
    print(str)
