x/tools/gopls: "extract method" creates invalid code when extracting free "continue" statement #63394
Labels
gopls
Issues related to the Go language server, gopls.
Refactoring
Issues related to refactoring tools
Tools
This label describes issues relating to any tools in the x/tools repository.
Milestone
When extracting statements from the body of a loop that include
continue
, but not the enclosing loop, gopls seems not to notice the implications of the continue statement, and this generates invalid code. Extracting:becomes:
This is a pity since the extract logic seems to go to great trouble to deal with return continuations.
The text was updated successfully, but these errors were encountered: