don't crash on:

package main
var x int
type x struct { a int }

R=ken
OCL=22903
CL=22903
This commit is contained in:
Russ Cox 2009-01-15 17:32:31 -08:00
parent 8a7cbadbbe
commit c1e7e270f1

View file

@ -63,7 +63,7 @@ dodcltype(Type *n)
// if n has been forward declared,
// use the Type* created then
s = n->sym;
if(s->block == block) {
if(s->block == block && s->otype != T) {
switch(s->otype->etype) {
case TFORWSTRUCT:
case TFORWINTER: