summaryrefslogtreecommitdiff
path: root/modules/gdscript
diff options
context:
space:
mode:
authorThakee Nathees <thakeenathees@gmail.com>2020-07-26 08:00:55 +0530
committerThakee Nathees <thakeenathees@gmail.com>2020-07-26 08:00:55 +0530
commit194c2aa7e2d6f2d8c8aaad65042e28b7d95eccd1 (patch)
treebb8ccdf552c93b03593b92061ace21ee6298f7f1 /modules/gdscript
parent5287124b720c860e36d2908283013d0e0e69b577 (diff)
GDScript: "Object" datatype changed from BUILTIN to NATIVE
Fix: #40656
Diffstat (limited to 'modules/gdscript')
-rw-r--r--modules/gdscript/gdscript_analyzer.cpp10
1 files changed, 10 insertions, 0 deletions
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) {