From a889084864f44db3a72a0320a6df656293c2044e Mon Sep 17 00:00:00 2001 From: George Marques Date: Mon, 31 Aug 2020 21:12:53 -0300 Subject: [PATCH] GDScript: Don't mark function parameters as constant They can be reassigned as if it were a local variable. --- modules/gdscript/gdscript_analyzer.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/gdscript/gdscript_analyzer.cpp b/modules/gdscript/gdscript_analyzer.cpp index 1332f5a99ad..c25307ed7f7 100644 --- a/modules/gdscript/gdscript_analyzer.cpp +++ b/modules/gdscript/gdscript_analyzer.cpp @@ -1267,6 +1267,7 @@ void GDScriptAnalyzer::resolve_pararameter(GDScriptParser::ParameterNode *p_para reduce_expression(p_parameter->default_value); result = p_parameter->default_value->get_datatype(); result.type_source = GDScriptParser::DataType::INFERRED; + result.is_constant = false; } if (p_parameter->datatype_specifier != nullptr) {