x == nil
x.go:5: cannot use nil as bool
c := x.(type);
x.go:88: use of .(type) outside type switch
R=ken
OCL=34476
CL=34476
case CTNIL:
switch(et) {
default:
+ yyerror("cannot use nil as %T", t);
+ n->type = T;
goto bad;
case TSTRING:
defaultlit2(&l, &r, 0);
n->left = l;
n->right = r;
+ if(l->type == T || r->type == T)
+ goto error;
t = l->type;
if(t->etype == TIDEAL)
t = r->type;
goto ret;
case OTYPESW:
- ok |= Etop;
- typecheck(&n->right, Erv);
- goto ret;
+ yyerror("use of .(type) outside type switch");
+ goto error;
case OXCASE:
ok |= Etop;