cmd/gc: change compile error to "use of package %S without selector"

At present, when a package identifier is used outside of a selector expression, gc gives the error "use of package %S outside selector". However, in the selector expression x.f, the spec defines f as the selector. This change makes the error clearer.

Fixes #7133.

LGTM=rsc
R=golang-codereviews, rsc
CC=golang-codereviews
https://golang.org/cl/50060047
This commit is contained in:
Brendan Daniel Tracey 2014-02-10 20:27:31 -05:00 committed by Russ Cox
parent d98dc0e891
commit d30949693c
1 changed files with 1 additions and 1 deletions

View File

@ -368,7 +368,7 @@ reswitch:
goto ret;
case OPACK:
yyerror("use of package %S not in selector", n->sym);
yyerror("use of package %S without selector", n->sym);
goto error;
case ODDD: