Browse Source

Merge pull request #26563 from vnen/gdscript-fixes

A couple of GDScript fixes
Rémi Verschelde 6 years ago
parent
commit
31206ca4e9
1 changed files with 1 additions and 2 deletions
  1. 1 2
      modules/gdscript/gdscript_parser.cpp

+ 1 - 2
modules/gdscript/gdscript_parser.cpp

@@ -3057,7 +3057,6 @@ void GDScriptParser::_parse_block(BlockNode *p_block, bool p_static) {
 				}
 				}
 
 
 				DataType iter_type;
 				DataType iter_type;
-				iter_type.is_constant = true;
 
 
 				if (container->type == Node::TYPE_OPERATOR) {
 				if (container->type == Node::TYPE_OPERATOR) {
 
 
@@ -5445,7 +5444,7 @@ GDScriptParser::DataType GDScriptParser::_resolve_type(const DataType &p_source,
 				String script_path = ScriptServer::get_global_class_path(id);
 				String script_path = ScriptServer::get_global_class_path(id);
 				if (script_path == self_path) {
 				if (script_path == self_path) {
 					result.kind = DataType::CLASS;
 					result.kind = DataType::CLASS;
-					result.class_type = current_class;
+					result.class_type = static_cast<ClassNode *>(head);
 				} else {
 				} else {
 					Ref<Script> script = ResourceLoader::load(script_path);
 					Ref<Script> script = ResourceLoader::load(script_path);
 					Ref<GDScript> gds = script;
 					Ref<GDScript> gds = script;