A receiver type may have an (alias type) name and thus be 'named'
even though the name doesn't refer to a defined type. Adjust the
error message to make this clearer.
Change-Id: I969bf8d1ba3db8820f67f6ecd6d5cfe564c5b80d
Reviewed-on: https://go-review.googlesource.com/112638
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
case t == nil || t.Broke():
// rely on typecheck having complained before
case t.Sym == nil:
- yyerror("invalid receiver type %v (%v is an unnamed type)", pa, t)
+ yyerror("invalid receiver type %v (%v is not a defined type)", pa, t)
case t.IsPtr():
yyerror("invalid receiver type %v (%v is a pointer type)", pa, t)
case t.IsInterface():