/* find operator type, coerce operands */
lft_type = nstr_promote(np->lft.val_type);
rgt_type = nstr_promote(np->rgt.val_type);
+ np->optype = NSC_NOTYPE;
if (lft_type == NSC_TYPEID) {
if (!nstr_coerce_val(&np->rgt, NSC_TYPEID, str))
np->optype = NSC_TYPEID;
&& !nstr_coerce_val(&np->rgt, NSC_LONG, str))
np->optype = NSC_LONG;
}
+ if (np->optype == NSC_NOTYPE)
+ return -1;
/* another condition? */
if (*tail == 0)
cond_type_mismatch(char *str)
{
if (str)
- pr("%s -- condition type mismatch\n", str);
+ pr("%s -- condition operand type mismatch\n", str);
return -1;
}