summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Marques <george@gmarqu.es>2020-01-09 15:42:31 -0300
committerGeorge Marques <george@gmarqu.es>2020-01-09 15:42:31 -0300
commit1aef8bfeb160f6c68804e33437fa2fad8e732202 (patch)
tree9fb643b367022bce3c6c5ae605504a4b1835f53d
parenta0ce88f953a4311edc726523ff8724b891407855 (diff)
GDScript: Fix resolution of default parameter values
Fix #26556
-rw-r--r--modules/gdscript/gdscript_parser.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/gdscript/gdscript_parser.cpp b/modules/gdscript/gdscript_parser.cpp
index a33d20e433..52a854e31f 100644
--- a/modules/gdscript/gdscript_parser.cpp
+++ b/modules/gdscript/gdscript_parser.cpp
@@ -7867,7 +7867,7 @@ void GDScriptParser::_check_function_types(FunctionNode *p_function) {
def_type.is_constant = false;
p_function->argument_types.write[i] = def_type;
} else {
- p_function->return_type = _resolve_type(p_function->return_type, p_function->line);
+ p_function->argument_types.write[i] = _resolve_type(p_function->argument_types[i], p_function->line);
if (!_is_type_compatible(p_function->argument_types[i], def_type, true)) {
String arg_name = p_function->arguments[i];