diff options
author | Thakee Nathees <thakeenathees@gmail.com> | 2020-07-26 08:00:55 +0530 |
---|---|---|
committer | Thakee Nathees <thakeenathees@gmail.com> | 2020-07-26 08:00:55 +0530 |
commit | 194c2aa7e2d6f2d8c8aaad65042e28b7d95eccd1 (patch) | |
tree | bb8ccdf552c93b03593b92061ace21ee6298f7f1 /modules/gdscript | |
parent | 5287124b720c860e36d2908283013d0e0e69b577 (diff) |
GDScript: "Object" datatype changed from BUILTIN to NATIVE
Fix: #40656
Diffstat (limited to 'modules/gdscript')
-rw-r--r-- | modules/gdscript/gdscript_analyzer.cpp | 10 |
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) { |