diff options
author | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2020-06-04 22:30:56 +0200 |
---|---|---|
committer | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2020-06-04 22:31:37 +0200 |
commit | 30053de1824c932a6b9f3620b46f8ba056a43c2c (patch) | |
tree | cdd926cf81818eb55af00972d42f56993c9a60d8 /modules/gdscript/gdscript_parser.cpp | |
parent | c0ff2a388dff38b86b888b9822f26cd3ab04e727 (diff) |
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.
Diffstat (limited to 'modules/gdscript/gdscript_parser.cpp')
-rw-r--r-- | modules/gdscript/gdscript_parser.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/gdscript/gdscript_parser.cpp b/modules/gdscript/gdscript_parser.cpp index 0e498f6895..39e0295e2b 100644 --- a/modules/gdscript/gdscript_parser.cpp +++ b/modules/gdscript/gdscript_parser.cpp @@ -7336,8 +7336,8 @@ GDScriptParser::DataType GDScriptParser::_reduce_function_call_type(const Operat } else if (!_is_type_compatible(arg_types[i - arg_diff], par_type, true)) { // Supertypes are acceptable for dynamic compliance 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 (" + - par_type.to_string() + ") doesn't match the function argument's 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's expected argument type (" + arg_types[i - arg_diff].to_string() + ").", p_call->line); return DataType(); |