diff --git a/src/pkg/go/ast/import.go b/src/pkg/go/ast/import.go index 2d4f69aaea..a68a4840f8 100644 --- a/src/pkg/go/ast/import.go +++ b/src/pkg/go/ast/import.go @@ -20,7 +20,7 @@ func SortImports(fset *token.FileSet, f *File) { break } - if d.Lparen == token.NoPos { + if !d.Lparen.IsValid() { // Not a block: sorted by default. continue }