Commit bb7c3c68 authored by Robert Griesemer's avatar Robert Griesemer

go/ast: minor cleanup

It's better to use IsValid() then checking a (possibly
partially set up) position against NoPos directly.

R=dsymonds
CC=golang-dev
https://golang.org/cl/6855099
parent 178c8578
......@@ -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
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment