Skip to content

x/tools/go/analysis/passes/modernize: bad rangeint rewriting #77034

@zigo101

Description

@zigo101

Go version

master

Output of go env in your module/workspace:

.

What did you do?

From #76977 (comment)

func foo() {
    for i := 0; i < 10; i++ {
        for i = range 15 {}
    }
}

What did you see happen?

moderize thinks the 3-clause-for loop can be rewritten.

What did you expect to see?

It can't.

Metadata

Metadata

Assignees

Labels

BugReportIssues describing a possible bug in the Go implementation.ToolsThis label describes issues relating to any tools in the x/tools repository.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions