From b24cb92240e047a7976f9eccc1b390ac090692e7 Mon Sep 17 00:00:00 2001 From: George Marques Date: Sun, 3 Mar 2019 21:39:42 -0300 Subject: [PATCH 1/2] GDScript: Allow `for` iterator to be rededefined --- modules/gdscript/gdscript_parser.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/gdscript/gdscript_parser.cpp b/modules/gdscript/gdscript_parser.cpp index aff39f0b072..7c4ed847577 100644 --- a/modules/gdscript/gdscript_parser.cpp +++ b/modules/gdscript/gdscript_parser.cpp @@ -3057,7 +3057,6 @@ void GDScriptParser::_parse_block(BlockNode *p_block, bool p_static) { } DataType iter_type; - iter_type.is_constant = true; if (container->type == Node::TYPE_OPERATOR) { From 67fee40483258a90bc47abeba02deee7fa744317 Mon Sep 17 00:00:00 2001 From: George Marques Date: Sun, 3 Mar 2019 22:53:50 -0300 Subject: [PATCH 2/2] GDScript: Fix issue when detecting file class in inner class --- modules/gdscript/gdscript_parser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/gdscript/gdscript_parser.cpp b/modules/gdscript/gdscript_parser.cpp index 7c4ed847577..5619729c134 100644 --- a/modules/gdscript/gdscript_parser.cpp +++ b/modules/gdscript/gdscript_parser.cpp @@ -5444,7 +5444,7 @@ GDScriptParser::DataType GDScriptParser::_resolve_type(const DataType &p_source, String script_path = ScriptServer::get_global_class_path(id); if (script_path == self_path) { result.kind = DataType::CLASS; - result.class_type = current_class; + result.class_type = static_cast(head); } else { Ref