From: Russ Cox Date: Tue, 16 Jun 2009 03:15:59 +0000 (-0700) Subject: b/1909731 X-Git-Tag: weekly.2009-11-06~1402 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=30a28aec2535488d1b7296c19ab66f80e8aa5ba5;p=gostls13.git b/1909731 package main func f(a *c.b) {} func main() {} BUG=1909731 R=ken OCL=30322 CL=30322 --- diff --git a/src/cmd/gc/dcl.c b/src/cmd/gc/dcl.c index 122df1debc..4312cfaea2 100644 --- a/src/cmd/gc/dcl.c +++ b/src/cmd/gc/dcl.c @@ -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; diff --git a/src/cmd/gc/go.y b/src/cmd/gc/go.y index 2208693aad..0102b58e22 100644 --- a/src/cmd/gc/go.y +++ b/src/cmd/gc/go.y @@ -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)