diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-06-05 11:33:53 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-05 11:33:53 +0200 |
commit | 36f61030262c7661aab8407c784fd1e72eea219d (patch) | |
tree | a969313d6aa8dc27ba8c862f3e5b546be200d580 | |
parent | d0b89c42bf03fc7a38153477f8199d5212714d85 (diff) | |
parent | 30053de1824c932a6b9f3620b46f8ba056a43c2c (diff) |
Merge pull request #39301 from Calinou/fix-argument-parameter-confusion
Tweak the GDScript error message about passed argument type mismatch
-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 985ebbfdb5..a06ecb1ea8 100644 --- a/modules/gdscript/gdscript_parser.cpp +++ b/modules/gdscript/gdscript_parser.cpp @@ -7345,8 +7345,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(); |