diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-07-27 08:50:16 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-27 08:50:16 +0200 |
commit | 3e99059129d7902709ac2b06b2b56497e2f1b2ac (patch) | |
tree | 7ef56b878ff7d810b8623611381ed78c3940ff01 /modules/gdscript | |
parent | 0a7942f4bb61cba8f02f2cbe0ec83b95eefa6726 (diff) | |
parent | 194c2aa7e2d6f2d8c8aaad65042e28b7d95eccd1 (diff) |
Merge pull request #40714 from ThakeeNathees/Object-type-bug-fix
GDScript: "Object" datatype changed from BUILTIN to NATIVE
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) { |