From 1aef8bfeb160f6c68804e33437fa2fad8e732202 Mon Sep 17 00:00:00 2001 From: George Marques Date: Thu, 9 Jan 2020 15:42:31 -0300 Subject: [PATCH] GDScript: Fix resolution of default parameter values Fix #26556 --- modules/gdscript/gdscript_parser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/gdscript/gdscript_parser.cpp b/modules/gdscript/gdscript_parser.cpp index a33d20e4338..52a854e31fd 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];