File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
test/refactoring/ConvertAsync Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -280,3 +280,12 @@ func testReturnHandling2(completion: @escaping (String) -> ()) {
280
280
// RETURN-HANDLING2-NEXT: {{^}}<#return#> a{{$}}
281
281
// RETURN-HANDLING2-NEXT: }
282
282
// RETURN-HANDLING2-NEXT: }
283
+
284
+ // FIXME: We should arguably be able to handle transforming this completion handler call (rdar://78011350).
285
+ // RUN: %refactor -add-async-alternative -dump-text -source-filename %s -pos=%(line+1):1 | %FileCheck -check-prefix=RETURN-HANDLING3 %s
286
+ func testReturnHandling3( _ completion: ( String ? , Error ? ) -> Void ) {
287
+ return ( completion ( " " , nil ) )
288
+ }
289
+ // RETURN-HANDLING3: func testReturnHandling3() async throws -> String {
290
+ // RETURN-HANDLING3-NEXT: {{^}} return (<#completion#>("", nil)){{$}}
291
+ // RETURN-HANDLING3-NEXT: }
You can’t perform that action at this time.
0 commit comments