correct compare_exact_values(x,y) for TypeId and Procedure

This commit is contained in:
Phil
2022-12-02 13:11:46 -08:00
parent 9c8eaeb988
commit 7a4106077a

View File

@@ -952,15 +952,15 @@ bool compare_exact_values(TokenKind op, ExactValue x, ExactValue y) {
case ExactValue_Typeid:
switch (op) {
case Token_CmpEq: return are_types_identical(x.value_typeid, y.value_typeid);
case Token_NotEq: return !are_types_identical(x.value_typeid, y.value_typeid);
case Token_CmpEq: return x.value_typeid == y.value_typeid;
case Token_NotEq: return x.value_typeid != y.value_typeid;
}
break;
case ExactValue_Procedure:
switch (op) {
case Token_CmpEq: return are_types_identical(x.value_typeid, y.value_typeid);
case Token_NotEq: return !are_types_identical(x.value_typeid, y.value_typeid);
case Token_CmpEq: return x.value_typeid == y.value_typeid;
case Token_NotEq: return x.value_typeid != y.value_typeid;
}
break;
}