go.tools/go/types: added TODO re: misleading error message
Fix not urgent. LGTM=adonovan R=adonovan CC=golang-codereviews https://golang.org/cl/135810043
This commit is contained in:
parent
4aaa1f6f6c
commit
7486f5904a
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue