From 8d2c6f61d1047d54d9c550cbfaa0573b105bc51d Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Wed, 7 Oct 2009 14:55:12 -0700 Subject: better handling of mistaken top-level variable references during the parsing of :=. the base problem is that when reading a,b,c,d the parser makes those refer to existing variables, which might create a few stub top-level ones for undefined names, but then if a := is the next token, we need to undo those stubs. this was causing problems in multifile packages in which one file used a := variable named rpc and the other imported a package named rpc. R=ken OCL=35446 CL=35446 --- src/cmd/gc/subr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/cmd/gc/subr.c') diff --git a/src/cmd/gc/subr.c b/src/cmd/gc/subr.c index 97fdc4f19..007344e93 100644 --- a/src/cmd/gc/subr.c +++ b/src/cmd/gc/subr.c @@ -269,7 +269,7 @@ importdot(Sym *opkg, Node *pack) } if(n == 0) { // can't possibly be used - there were no symbols - print("%L: imported and not used: %s\n", pack->pline, pack->sym->name); + print("%L: imported and not used: %s\n", pack->lineno, pack->sym->name); nerrors++; } } -- cgit v1.2.3