diff options
author | Russ Cox <rsc@golang.org> | 2009-06-25 16:57:56 -0700 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2009-06-25 16:57:56 -0700 |
commit | a4895d5ee7224fe0a79cb87a6543d9623db3aa7f (patch) | |
tree | 3629e9e10da4ec2493baf480d0368ecff2dedeab /src | |
parent | b832c47c7e91bb785247fcffaf5c77704f7ff8d6 (diff) | |
download | golang-a4895d5ee7224fe0a79cb87a6543d9623db3aa7f.tar.gz |
the any fix was too aggressive; allow any in any import.
R=ken
OCL=30768
CL=30768
Diffstat (limited to 'src')
-rw-r--r-- | src/cmd/gc/lex.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/cmd/gc/lex.c b/src/cmd/gc/lex.c index 32a929842..a5b424410 100644 --- a/src/cmd/gc/lex.c +++ b/src/cmd/gc/lex.c @@ -272,6 +272,9 @@ importfile(Val *f) return; } + if(!debug['A']) + anysym->def = typenod(types[TANY]); + if(!findpkg(f->u.sval)) fatal("can't find import: %Z", f->u.sval); imp = Bopen(namebuf, OREAD); @@ -343,12 +346,12 @@ unimportfile(void) void cannedimports(char *file, char *cp) { - lineno++; // if sys.6 is included on line 1, - linehist(file, 0, 0); // the debugger gets confused - if(!debug['A']) anysym->def = typenod(types[TANY]); + lineno++; // if sys.6 is included on line 1, + linehist(file, 0, 0); // the debugger gets confused + pushedio = curio; curio.bin = nil; curio.peekc = 0; |