diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-06-03 20:53:02 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-03 20:53:02 +0200 |
commit | 8cc8383a7fa3097eb67c58da5379c0bc566e1331 (patch) | |
tree | 8c91b99915125fdfe6d8a2387f31576c0763be01 /modules/gdscript | |
parent | 42569f566f7750e355bf07f15008b54677043536 (diff) | |
parent | b5bbedb45aa2c12bcf5b692fcab4aedad3648443 (diff) |
Merge pull request #29433 from bojidar-bg/29406-dictionary-constant
Properly catch certain errors in Dictionary and Array declarations
Diffstat (limited to 'modules/gdscript')
-rw-r--r-- | modules/gdscript/gdscript_parser.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/gdscript/gdscript_parser.cpp b/modules/gdscript/gdscript_parser.cpp index 922ee395dd..44a91303e9 100644 --- a/modules/gdscript/gdscript_parser.cpp +++ b/modules/gdscript/gdscript_parser.cpp @@ -6021,7 +6021,11 @@ bool GDScriptParser::_is_type_compatible(const DataType &p_container, const Data } GDScriptParser::DataType GDScriptParser::_reduce_node_type(Node *p_node) { +#ifdef DEBUG_ENABLED + if (p_node->get_datatype().has_type && p_node->type != Node::TYPE_ARRAY && p_node->type != Node::TYPE_DICTIONARY) { +#else if (p_node->get_datatype().has_type) { +#endif return p_node->get_datatype(); } |