Browse Source

GDScript: Fix return of cast expression on compilation

It was mistakenly returning the source instead of the result.
George Marques 4 years ago
parent
commit
ed3d8f31df
1 changed files with 1 additions and 1 deletions
  1. 1 1
      modules/gdscript/gdscript_compiler.cpp

+ 1 - 1
modules/gdscript/gdscript_compiler.cpp

@@ -437,7 +437,7 @@ GDScriptCodeGenerator::Address GDScriptCompiler::_parse_expression(CodeGen &code
 				gen->pop_temporary();
 			}
 
-			return source;
+			return result;
 		} break;
 		case GDScriptParser::Node::CALL: {
 			const GDScriptParser::CallNode *call = static_cast<const GDScriptParser::CallNode *>(p_expression);