Skip to content

Commit

Permalink
GDScript: Don't mark function parameters as constant
Browse files Browse the repository at this point in the history
They can be reassigned as if it were a local variable.
  • Loading branch information
vnen committed Sep 1, 2020
1 parent c8e10aa commit a889084
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions modules/gdscript/gdscript_analyzer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit a889084

Please sign in to comment.