diff --git a/cmd/vet/types.go b/cmd/vet/types.go index a5bdeea4..8149a4ef 100644 --- a/cmd/vet/types.go +++ b/cmd/vet/types.go @@ -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 } }