diff options
author | George Marques <george@gmarqu.es> | 2020-08-31 21:12:53 -0300 |
---|---|---|
committer | George Marques <george@gmarqu.es> | 2020-09-01 09:26:28 -0300 |
commit | a889084864f44db3a72a0320a6df656293c2044e (patch) | |
tree | 257463c24b484d6a7fda02f0af6eded7dcfdf21c /modules/gdscript | |
parent | c8e10aa20bf383efc948103e0b591e7ccaea7c16 (diff) |
GDScript: Don't mark function parameters as constant
They can be reassigned as if it were a local variable.
Diffstat (limited to 'modules/gdscript')
-rw-r--r-- | modules/gdscript/gdscript_analyzer.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/modules/gdscript/gdscript_analyzer.cpp b/modules/gdscript/gdscript_analyzer.cpp index 1332f5a99a..c25307ed7f 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) { |