Refactor record polymorphic params code for unification

This commit is contained in:
gingerBill
2021-03-27 17:21:12 +00:00
parent 87bc9275fe
commit 342761e83a
2 changed files with 58 additions and 60 deletions

View File

@@ -5915,7 +5915,8 @@ bool check_builtin_procedure(CheckerContext *c, Operand *operand, Ast *call, i32
i32 i = id - cast(i32)BuiltinProc__type_simple_boolean_begin;
auto procedure = builtin_type_is_procs[i];
GB_ASSERT_MSG(procedure != nullptr, "%.*s", LIT(builtin_name));
operand->value = exact_value_bool(procedure(operand->type));
bool ok = procedure(operand->type);
operand->value = exact_value_bool(ok);
}
operand->mode = Addressing_Constant;
operand->type = t_untyped_bool;