goto badbinary;
t = l->type;
if(iscmp[n->op]) {
- t = idealbool;
evconst(n);
+ t = types[TBOOL];
if(n->op != OLITERAL) {
defaultlit2(&l, &r, 1);
n->left = l;
n->type = T;
if(top & Erv) {
n->op = OSENDNB;
- n->type = idealbool;
+ n->type = types[TBOOL];
}
goto ret;
goto error;
}
if(n->op == OCLOSED) {
- n->type = idealbool;
+ n->type = types[TBOOL];
ok |= Erv;
} else
ok |= Etop;
*op = OCONV;
*et = 0;
-
+
// preexisting error
if(t == T || t->etype == TFORW)
n->op = OAS2MAPW;
n->rlist->n = typecheckconv(nil, r, l->type->down, 0);
r = n->rlist->next->n;
- n->rlist->next->n = typecheckconv(nil, r, types[TBOOL], 1);
+ n->rlist->next->n = typecheckconv(nil, r, types[TBOOL], 0);
goto out;
}
if(l->defn == n)
l->type = r->type;
l = n->list->next->n;
- if(l->type != T && checkconv(idealbool, l->type, 0, &op, &et) < 0)
+ if(l->type != T && checkconv(types[TBOOL], l->type, 0, &op, &et) < 0)
yyerror("cannot assign bool value to %+N", l);
if(l->defn == n && l->ntype == N)
l->type = types[TBOOL];