Browse Source

GDScript: Don't mark function parameters as constant

They can be reassigned as if it were a local variable.
George Marques 5 years ago
parent
commit
a889084864
1 changed files with 1 additions and 0 deletions
  1. 1 0
      modules/gdscript/gdscript_analyzer.cpp

+ 1 - 0
modules/gdscript/gdscript_analyzer.cpp

@@ -1267,6 +1267,7 @@ void GDScriptAnalyzer::resolve_pararameter(GDScriptParser::ParameterNode *p_para
 		reduce_expression(p_parameter->default_value);
 		reduce_expression(p_parameter->default_value);
 		result = p_parameter->default_value->get_datatype();
 		result = p_parameter->default_value->get_datatype();
 		result.type_source = GDScriptParser::DataType::INFERRED;
 		result.type_source = GDScriptParser::DataType::INFERRED;
+		result.is_constant = false;
 	}
 	}
 
 
 	if (p_parameter->datatype_specifier != nullptr) {
 	if (p_parameter->datatype_specifier != nullptr) {