From 82b15ab4690f14c4e19d3532f834e3931d6daed4 Mon Sep 17 00:00:00 2001 From: George Marques Date: Tue, 24 Sep 2019 18:03:50 -0300 Subject: [PATCH] GDScript: Fix type resolution not being return in some cases Some situations caused the parser node type to not being update when trying to resolve the type, returning invalid data and breaking the parsing when it shouldn't. This patch fix the behavior. (cherry picked from commit 64d09b7de532b75038c24e689d16a48a36678654) --- modules/gdscript/gdscript_parser.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/gdscript/gdscript_parser.cpp b/modules/gdscript/gdscript_parser.cpp index 4ed54eabb11..2360aa03486 100644 --- a/modules/gdscript/gdscript_parser.cpp +++ b/modules/gdscript/gdscript_parser.cpp @@ -6518,7 +6518,8 @@ GDScriptParser::DataType GDScriptParser::_reduce_node_type(Node *p_node) { default: {} } - p_node->set_datatype(_resolve_type(node_type, p_node->line)); + node_type = _resolve_type(node_type, p_node->line); + p_node->set_datatype(node_type); return node_type; }