diff --git a/go/types/builtins.go b/go/types/builtins.go index fcffa652..fae00863 100644 --- a/go/types/builtins.go +++ b/go/types/builtins.go @@ -495,6 +495,10 @@ func (check *Checker) builtin(x *operand, call *ast.CallExpr, id builtinId) (_ b check.invalidArg(x.pos(), "%s has no single field %s", base, sel) return case *Func: + // TODO(gri) Using derefStructPtr may result in methods being found + // that don't actually exist. An error either way, but the error + // message is confusing. See: http://play.golang.org/p/al75v23kUy , + // but go/types reports: "invalid argument: x.m is a method value". check.invalidArg(arg0.Pos(), "%s is a method value", arg0) return }