1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Merge pull request #99765 from dalexeev/core-fix-json-from-to-native

Core: Fix `JSON.{from,to}_native()` issues
This commit is contained in:
Thaddeus Crews
2024-12-10 14:15:53 -06:00
15 changed files with 1237 additions and 874 deletions

View File

@@ -3861,13 +3861,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) {