mirror of
https://github.com/golang/go
synced 2024-11-05 15:16:11 -07:00
go.tools/cmd/vet: use new Assertable predicate (fix build)
LGTM=r R=r CC=golang-codereviews https://golang.org/cl/59210045
This commit is contained in:
parent
3e68d08251
commit
4dcaee97b2
@ -103,7 +103,7 @@ func (f *File) matchArgTypeInternal(t printfArgType, typ types.Type, arg ast.Exp
|
||||
}
|
||||
// If we can use a string, might arg (dynamically) implement the Stringer or Error interface?
|
||||
if t&argString != 0 {
|
||||
if types.Implements(typ, errorType, false) || types.Implements(typ, stringerType, false) {
|
||||
if types.Assertable(errorType, typ) || types.Assertable(stringerType, typ) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user