handle intorcard_type better in case statements

This commit is contained in:
ceriel
1988-11-29 13:13:03 +00:00
parent 73ac23824b
commit 5252b760d9
4 changed files with 26 additions and 6 deletions

View File

@@ -832,13 +832,11 @@ ChkBinOper(expp)
tpl = BaseType(expp->nd_left->nd_type);
tpr = BaseType(expp->nd_right->nd_type);
if (tpl == intorcard_type) {
if (tpr == int_type || tpr == card_type) {
if (intorcard(tpl, tpr) != 0) {
if (tpl == intorcard_type) {
expp->nd_left->nd_type = tpl = tpr;
}
}
if (tpr == intorcard_type) {
if (tpl == int_type || tpl == card_type) {
if (tpr == intorcard_type) {
expp->nd_right->nd_type = tpr = tpl;
}
}