From: Rob Pike Date: Sun, 24 Feb 2013 21:18:36 +0000 (-0800) Subject: cmd/vet: fix up some nits in print.go found by kamil.kisiel@gmail.com X-Git-Tag: go1.1rc2~870 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=1174a18c3d2c61466db60feb3919288b1dd8a548;p=gostls13.git cmd/vet: fix up some nits in print.go found by kamil.kisiel@gmail.com R=golang-dev, kamil.kisiel, bradfitz CC=golang-dev https://golang.org/cl/7369049 --- diff --git a/src/cmd/vet/print.go b/src/cmd/vet/print.go index b164a9b588..fde440a05e 100644 --- a/src/cmd/vet/print.go +++ b/src/cmd/vet/print.go @@ -415,8 +415,8 @@ func (f *File) numArgsInSignature(call *ast.CallExpr) int { } // isErrorMethodCall reports whether the call is of a method with signature -// func Error() error -// where "error" is the universe's error type. We know the method is called "Error" +// func Error() string +// where "string" is the universe's string type. We know the method is called "Error" // and f.pkg is set. func (f *File) isErrorMethodCall(call *ast.CallExpr) bool { // Is it a selector expression? Otherwise it's a function call, not a method call. @@ -457,7 +457,7 @@ func (f *File) isErrorMethodCall(call *ast.CallExpr) bool { if types.IsIdentical(result, types.Typ[types.String]) { return true } - return true + return false } // Error methods that do not satisfy the Error interface and should be checked.