Commit Graph

4 Commits

Author SHA1 Message Date
Ben Barham
762337cc9b [Refactoring] Add @completionHandlerAsync to sync function
When adding an async alternative, add the @completionHandlerAsync
attribute to the sync function. Check for this attribute in addition to
the name check, ie. convert a call if the callee has either
@completionHandlerAsync or a name that is completion-handler-like name.

The addition of the attribute is currently gated behind the experimental
concurrency flag.

Resolves rdar://77486504
2021-05-14 20:19:02 +10:00
Andrew Trick
9537b14404 Fix refactor-check-compiles.py for python3
Fixes:
    sys.stdout.write(dump_text_output)
TypeError: write() argument must be str, not bytes
2021-05-10 20:50:18 -07:00
Alex Hoppen
98e6680c85 [Refactoring] When adding an async alternative refactor the old method to call the async method using detach
Instead of leaving two copies of the same implementation, rewrite the old method with the completion handler to call the newly added `async` method.

Resolves rdar://74464833
2021-05-04 12:06:27 +02:00
Alex Hoppen
9916a6d5c7 [Refactoring] Add a drop-in replacement for swift-refactor which checks that the code compiles after refactoring 2021-04-30 23:48:23 +02:00