From 194c2aa7e2d6f2d8c8aaad65042e28b7d95eccd1 Mon Sep 17 00:00:00 2001 From: Thakee Nathees Date: Sun, 26 Jul 2020 08:00:55 +0530 Subject: GDScript: "Object" datatype changed from BUILTIN to NATIVE Fix: #40656 --- modules/gdscript/gdscript_analyzer.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'modules/gdscript') diff --git a/modules/gdscript/gdscript_analyzer.cpp b/modules/gdscript/gdscript_analyzer.cpp index 51d93481b6..0843a54106 100644 --- a/modules/gdscript/gdscript_analyzer.cpp +++ b/modules/gdscript/gdscript_analyzer.cpp @@ -342,6 +342,16 @@ GDScriptParser::DataType GDScriptAnalyzer::resolve_datatype(GDScriptParser::Type return result; } + if (first == "Object") { + result.kind = GDScriptParser::DataType::NATIVE; + result.native_type = "Object"; + if (p_type->type_chain.size() > 1) { + push_error(R"("Object" type don't contain nested types.)", p_type->type_chain[1]); + return GDScriptParser::DataType(); + } + return result; + } + if (GDScriptParser::get_builtin_type(first) < Variant::VARIANT_MAX) { // Built-in types. if (p_type->type_chain.size() > 1) { -- cgit v1.2.3