]> Cypherpunks repositories - gostls13.git/commitdiff
b/1909731
authorRuss Cox <rsc@golang.org>
Tue, 16 Jun 2009 03:15:59 +0000 (20:15 -0700)
committerRuss Cox <rsc@golang.org>
Tue, 16 Jun 2009 03:15:59 +0000 (20:15 -0700)
package main
func f(a *c.b) {}
func main() {}

BUG=1909731
R=ken
OCL=30322
CL=30322

src/cmd/gc/dcl.c
src/cmd/gc/go.y

index 122df1debca2493f214f327d43a7bbd2d1e69002..4312cfaea2f7e25ed9986fb630972bd3032d165b 100644 (file)
@@ -1203,6 +1203,8 @@ oldtype(Sym *s)
 {
        Type *t;
 
+       if(s == S)
+               return T;
        if(s->def == N || s->def->op != OTYPE) {
                yyerror("%S is not a type", s);
                return T;
index 2208693aaddf4932f31c3f0fc0d12a555527a153..0102b58e2257a9cd2ac8f86d34b8fd2855a7593a 100644 (file)
@@ -1087,6 +1087,11 @@ othertype:
 |      interfacetype
 |      dotname
        {
+               if($1->op == ODOT) {
+                       yyerror("%S.%S is not a type", $1->left->sym, $1->right->sym);
+                       $$ = T;
+                       break;
+               }
                if($1->op == OTYPE)
                if($1->type->etype == TANY)
                if(strcmp(package, "PACKAGE") != 0)