upd: allow bool * str

This commit is contained in:
2023-11-10 08:50:06 +08:00
parent 169969dc8a
commit cf71f4ded1

View File

@ -118,16 +118,13 @@ int ConverToSameArithType(std::any &a, std::any &b,
"situation",
33);
if (allow_string_operation && (ptr_a_string || ptr_b_string)) {
if (!(ptr_a_string || ptr_a_int2048))
if ((ptr_a_float || ptr_a_float))
throw InterpretException(
"ConverToSameArithType: string operation not allowed in this "
"situation",
34);
if (!(ptr_b_string || ptr_b_int2048))
throw InterpretException(
"ConverToSameArithType: string operation not allowed in this "
"situation",
35);
if (ptr_a_bool) a = ZYM::int2048(*ptr_a_bool);
if (ptr_b_bool) b = ZYM::int2048(*ptr_b_bool);
return 1;
}
int level_a = (ptr_a_bool != nullptr ? 1 : 0) +