From: Brendan Daniel Tracey Date: Tue, 11 Feb 2014 01:27:31 +0000 (-0500) Subject: cmd/gc: change compile error to "use of package %S without selector" X-Git-Tag: go1.3beta1~776 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=d30949693c62bc81046d558681292a4254d4d7c0;p=gostls13.git 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 --- diff --git a/src/cmd/gc/typecheck.c b/src/cmd/gc/typecheck.c index 3c27d99154..15d1dfbace 100644 --- a/src/cmd/gc/typecheck.c +++ b/src/cmd/gc/typecheck.c @@ -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: