type-checking fix for vector-of-string operations

This commit is contained in:
Vern Paxson 2024-08-05 09:30:03 +01:00 committed by Arne Welzel
parent 3cf3cc3c5e
commit 1d7e71b499

View file

@ -1992,8 +1992,10 @@ EqExpr::EqExpr(ExprTag arg_tag, ExprPtr arg_op1, ExprPtr arg_op2)
} }
} }
else if ( bt1 == TYPE_PATTERN && bt2 == TYPE_STRING ) else if ( (bt1 == TYPE_PATTERN && bt2 == TYPE_STRING) || (bt1 == TYPE_STRING && bt2 == TYPE_PATTERN) ) {
; if ( op1->GetType()->Tag() == TYPE_VECTOR )
ExprError("cannot compare string vectors with pattern vectors");
}
else else
ExprError("type clash in comparison"); ExprError("type clash in comparison");