Properly catch certain errors in Dictionary declarations

Fixes #29406
This commit is contained in:
Bojidar Marinov 2019-06-03 17:29:05 +03:00
parent 4b399034aa
commit b5bbedb45a
No known key found for this signature in database
GPG key ID: 4D546A8F1E091856

View file

@ -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();
}