upd: better support str vs other

This commit is contained in:
2023-11-10 11:12:15 +08:00
parent d5b99b0c4e
commit 730b913e85

View File

@ -120,11 +120,6 @@ int ConverToSameArithType(std::any &a, std::any &b,
"situation", "situation",
33); 33);
if (allow_string_operation && (ptr_a_string || ptr_b_string)) { if (allow_string_operation && (ptr_a_string || ptr_b_string)) {
if ((ptr_a_float || ptr_a_float))
throw InterpretException(
"ConverToSameArithType: string operation not allowed in this "
"situation",
34);
if (ptr_a_bool) a = ZYM::int2048(*ptr_a_bool); if (ptr_a_bool) a = ZYM::int2048(*ptr_a_bool);
if (ptr_b_bool) b = ZYM::int2048(*ptr_b_bool); if (ptr_b_bool) b = ZYM::int2048(*ptr_b_bool);
return 1; return 1;