cmd/compile/internal/types2: make go vet happy

Also, gofmt a few files.

Change-Id: Ie430556f5c1ae9c8acc24bbc5500a2579275fd39
This commit is contained in:
Robert Griesemer 2020-05-13 22:45:40 -07:00
parent 821d2a635c
commit 75b401bccf
2 changed files with 2 additions and 2 deletions

View File

@ -61,7 +61,7 @@ func (check *Checker) arity(pos syntax.Pos, names []*syntax.Name, inits []syntax
}
case l > r && r != 1: // if r == 1 it may be a multi-valued function and we can't say anything yet
n := names[r]
check.errorf(n.Pos(), "missing init expr for %s", n)
check.errorf(n.Pos(), "missing init expr for %s", n.Value)
}
}

View File

@ -27,7 +27,7 @@ func translateFile(importer *go2go.Importer, file string) {
if err != nil {
die(err.Error())
}
if err := ioutil.WriteFile(strings.TrimSuffix(file, ".go2") + ".go", out, 0644); err != nil {
if err := ioutil.WriteFile(strings.TrimSuffix(file, ".go2")+".go", out, 0644); err != nil {
die(err.Error())
}
}