mirror of
https://github.com/godotengine/godot.git
synced 2025-11-01 06:01:14 +00:00
Merge pull request #68481 from dalexeev/gds-fix-dyn-arg-def-val
GDScript 2.0: Fix shift due to skip of non-constant default argument values
This commit is contained in:
commit
2d96f63e09
1 changed files with 2 additions and 0 deletions
|
|
@ -1162,6 +1162,8 @@ void GDScriptAnalyzer::resolve_function_signature(GDScriptParser::FunctionNode *
|
||||||
|
|
||||||
if (p_function->parameters[i]->default_value->is_constant) {
|
if (p_function->parameters[i]->default_value->is_constant) {
|
||||||
p_function->default_arg_values.push_back(p_function->parameters[i]->default_value->reduced_value);
|
p_function->default_arg_values.push_back(p_function->parameters[i]->default_value->reduced_value);
|
||||||
|
} else {
|
||||||
|
p_function->default_arg_values.push_back(Variant()); // Prevent shift.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif // TOOLS_ENABLED
|
#endif // TOOLS_ENABLED
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue