GDScript: Fix resolution of default parameter values

Fix #26556
This commit is contained in:
George Marques 2020-01-09 15:42:31 -03:00
parent a0ce88f953
commit 1aef8bfeb1
No known key found for this signature in database
GPG key ID: 046BD46A3201E43D

View file

@ -7867,7 +7867,7 @@ void GDScriptParser::_check_function_types(FunctionNode *p_function) {
def_type.is_constant = false; def_type.is_constant = false;
p_function->argument_types.write[i] = def_type; p_function->argument_types.write[i] = def_type;
} else { } 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)) { if (!_is_type_compatible(p_function->argument_types[i], def_type, true)) {
String arg_name = p_function->arguments[i]; String arg_name = p_function->arguments[i];