]> Cypherpunks repositories - gostls13.git/commitdiff
the any fix was too aggressive; allow any in any import.
authorRuss Cox <rsc@golang.org>
Thu, 25 Jun 2009 23:57:56 +0000 (16:57 -0700)
committerRuss Cox <rsc@golang.org>
Thu, 25 Jun 2009 23:57:56 +0000 (16:57 -0700)
R=ken
OCL=30768
CL=30768

src/cmd/gc/lex.c

index 32a92984210e584b17f2945ee13890f6366db213..a5b42441001de4cab2a8ee2aa88255f4ffe52c3d 100644 (file)
@@ -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;