diff options
author | Bojidar Marinov <bojidar.marinov.bg@gmail.com> | 2019-06-03 17:29:05 +0300 |
---|---|---|
committer | Bojidar Marinov <bojidar.marinov.bg@gmail.com> | 2019-06-03 17:29:05 +0300 |
commit | b5bbedb45aa2c12bcf5b692fcab4aedad3648443 (patch) | |
tree | 1e25cebe06b75195536a64231a33a725fc4ef187 | |
parent | 4b399034aa162c032dc50ef1db9c04d2468bef12 (diff) |
Properly catch certain errors in Dictionary declarations
Fixes #29406
-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 9590009a54..4d2e444aa4 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(); } |