Skip to content

Commit 30652ec

Browse files
committed
go/analysis/internal/checker: applyFixes condition changed to greater than or equal to
1 parent 248c34b commit 30652ec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

go/analysis/internal/checker/checker.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ func applyFixes(roots []*action) {
405405
}
406406

407407
edit := node.edit
408-
if edit.start > cur {
408+
if edit.start > cur || (cur == 0 && edit.start == 0) {
409409
out.Write(contents[cur:edit.start])
410410
out.Write(edit.newText)
411411
}

0 commit comments

Comments
 (0)