1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-11 13:10:58 +00:00

GDScript: Don't mark function parameters as constant

They can be reassigned as if it were a local variable.
This commit is contained in:
George Marques
2020-08-31 21:12:53 -03:00
parent c8e10aa20b
commit a889084864

View File

@@ -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) {