diff options
author | Russ Cox <rsc@golang.org> | 2009-08-19 17:27:08 -0700 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2009-08-19 17:27:08 -0700 |
commit | 16c16c710b89d0d45800fe3651cf51a4a9d3f19d (patch) | |
tree | 0f98a327c8b3a22dc374d6f4612b1c10f27f93ab /src/cmd/gc/go.y | |
parent | 47f808ba0cd1c70478f00f63a8cd93980043daad (diff) | |
download | go-16c16c710b89d0d45800fe3651cf51a4a9d3f19d.tar.gz |
produce diagnostic for
import "fmt"
var fmt = 1
R=ken
OCL=33556
CL=33561
Diffstat (limited to 'src/cmd/gc/go.y')
-rw-r--r-- | src/cmd/gc/go.y | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/src/cmd/gc/go.y b/src/cmd/gc/go.y index 129e77d6d..dfee62293 100644 --- a/src/cmd/gc/go.y +++ b/src/cmd/gc/go.y @@ -177,14 +177,6 @@ import_stmt: break; } - // In order to allow multifile packages to use type names - // that are the same as the package name (i.e. go/parser - // is package parser and has a type called parser), we have - // to not bother trying to declare the package if it is our package. - // TODO(rsc): Is there a better way to tell if the package is ours? - if(my == import && strcmp(import->name, package) == 0) - break; - // TODO(rsc): this line is needed for a package // which does bytes := in a function, which creates // an ONONAME for bytes, but then a different file @@ -197,7 +189,7 @@ import_stmt: my->def = nod(OPACK, N, N); my->def->sym = import; my->lastlineno = $1; - import->block = -1; // above top level + import->block = 1; // at top level } |