Core: Fix JSON.{from,to}_native() issues

This commit is contained in:
Danil Alexeev 2024-11-27 18:15:49 +03:00
parent bbc54692c0
commit bd1a35ce9e
No known key found for this signature in database
GPG key ID: 5A52F75A8679EC57
15 changed files with 1237 additions and 874 deletions

View file

@ -3858,13 +3858,10 @@ static Error _lookup_symbol_from_base(const GDScriptParser::DataType &p_base, co
return OK;
}
for (int i = 0; i < Variant::VARIANT_MAX; i++) {
Variant::Type t = Variant::Type(i);
if (Variant::get_type_name(t) == p_symbol) {
r_result.type = ScriptLanguage::LOOKUP_RESULT_CLASS;
r_result.class_name = Variant::get_type_name(t);
return OK;
}
if (Variant::get_type_by_name(p_symbol) < Variant::VARIANT_MAX) {
r_result.type = ScriptLanguage::LOOKUP_RESULT_CLASS;
r_result.class_name = p_symbol;
return OK;
}
if ("Variant" == p_symbol) {