summaryrefslogtreecommitdiff
path: root/modules/gdscript
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-06-03 20:53:02 +0200
committerGitHub <noreply@github.com>2019-06-03 20:53:02 +0200
commit8cc8383a7fa3097eb67c58da5379c0bc566e1331 (patch)
tree8c91b99915125fdfe6d8a2387f31576c0763be01 /modules/gdscript
parent42569f566f7750e355bf07f15008b54677043536 (diff)
parentb5bbedb45aa2c12bcf5b692fcab4aedad3648443 (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.cpp4
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();
}