-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Open
Labels
BugReportIssues describing a possible bug in the Go implementation.Issues describing a possible bug in the Go implementation.RefactoringIssues related to refactoring toolsIssues related to refactoring toolsToolsThis label describes issues relating to any tools in the x/tools repository.This label describes issues relating to any tools in the x/tools repository.
Milestone
Description
The reflecttypefor modernizer transforms code such as var zero T; return TypeOf(zero)
to use TypeFor[T]()
, leaving the zero variable unused, which is an illegal program. The analyzer should check whether it eliminated the last use of the variable and if so eliminate the variable itself. This seems like a refactoring operator that would find use across our refactoring tools, perhaps some of which exhibit similar bugs.
Thanks to @cuishuang for pointing it out.
dmitshur
Metadata
Metadata
Assignees
Labels
BugReportIssues describing a possible bug in the Go implementation.Issues describing a possible bug in the Go implementation.RefactoringIssues related to refactoring toolsIssues related to refactoring toolsToolsThis label describes issues relating to any tools in the x/tools repository.This label describes issues relating to any tools in the x/tools repository.