You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-15 13:51:40 +00:00
Tweak the GDScript error message about passed argument type mismatch
This makes it less confusing.
This closes https://github.com/godotengine/godot-proposals/issues/670.
(cherry picked from commit 30053de182)
This commit is contained in:
committed by
Rémi Verschelde
parent
8b321354d8
commit
aeb5513bab
@@ -7375,8 +7375,8 @@ GDScriptParser::DataType GDScriptParser::_reduce_function_call_type(const Operat
|
|||||||
} else if (!_is_type_compatible(arg_types[i - arg_diff], par_type, true)) {
|
} else if (!_is_type_compatible(arg_types[i - arg_diff], par_type, true)) {
|
||||||
// Supertypes are acceptable for dynamic compliance
|
// Supertypes are acceptable for dynamic compliance
|
||||||
if (!_is_type_compatible(par_type, arg_types[i - arg_diff])) {
|
if (!_is_type_compatible(par_type, arg_types[i - arg_diff])) {
|
||||||
_set_error("At \"" + callee_name + "()\" call, argument " + itos(i - arg_diff + 1) + ". Assigned type (" +
|
_set_error("At \"" + callee_name + "()\" call, argument " + itos(i - arg_diff + 1) + ". The passed argument's type (" +
|
||||||
par_type.to_string() + ") doesn't match the function argument's type (" +
|
par_type.to_string() + ") doesn't match the function's expected argument type (" +
|
||||||
arg_types[i - arg_diff].to_string() + ").",
|
arg_types[i - arg_diff].to_string() + ").",
|
||||||
p_call->line);
|
p_call->line);
|
||||||
return DataType();
|
return DataType();
|
||||||
|
|||||||
Reference in New Issue
Block a user