Commit eeade745 authored by David Symonds's avatar David Symonds

vet: clean up taglit error print when typechecking fails.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/7416050
parent 6b34eba0
......@@ -72,7 +72,11 @@ func (f *File) checkUntaggedLiteral(c *ast.CompositeLit) {
return
}
f.Warnf(c.Pos(), "%s composite literal uses untagged fields", typ)
pre := ""
if typ != nil {
pre = typ.String() + " "
}
f.Warn(c.Pos(), pre+"composite literal uses untagged fields")
}
// pkgPath returns the import path "image/png" for the package name "png".
......
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