Skip to content

Commit 9b15a61

Browse files
authored
[Refactoring] Avoid redeclarations or shadowing in async refactored code (#37400)
When converting a call or function, rename declarations such that redeclaration errors and shadowing are avoided. In some cases this will be overly conservative, but since any renamed variable can be fixed with edit all in scope, this is preferred over causing redeclaration errors or possible shadowing. Resolves rdar://73973517
1 parent 04ea485 commit 9b15a61

File tree

7 files changed

+1234
-151
lines changed

7 files changed

+1234
-151
lines changed

include/swift/AST/DiagnosticsRefactoring.def

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,6 @@ ERROR(unknown_callback_conditions, none, "cannot refactor complex if conditions"
6262

6363
ERROR(mixed_callback_conditions, none, "cannot refactor mixed nil and not-nil conditions", ())
6464

65-
ERROR(callback_multiple_bound_names, none, "cannot refactor when multiple names bound to single declaration, had '%0' and found '%1'", (StringRef, StringRef))
66-
6765
ERROR(callback_with_fallthrough, none, "cannot refactor switch with fallthrough", ())
6866

6967
ERROR(callback_with_default, none, "cannot refactor switch with default case", ())

0 commit comments

Comments
 (0)