Skip to content

Commit

Permalink
change RETURN_VALUE_DISCARDED GDScript warn text
Browse files Browse the repository at this point in the history
changed RETURN_VALUE_DISCARDED GDscript warning text to mention how the return value of a function is discarded; update GDScript parser warning test to include new warning text.
  • Loading branch information
souplamp committed Nov 21, 2022
1 parent 895428c commit 5bdd883
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion modules/gdscript/gdscript_warning.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ String GDScriptWarning::get_message() const {
} break;
case RETURN_VALUE_DISCARDED: {
CHECK_SYMBOLS(1);
return "The function '" + symbols[0] + "()' returns a value, but this value is never used.";
return "The function '" + symbols[0] + "()' returns a value that will be discarded if not used.";
} break;
case PROPERTY_USED_AS_FUNCTION: {
CHECK_SYMBOLS(2);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ GDTEST_OK
>> WARNING
>> Line: 6
>> RETURN_VALUE_DISCARDED
>> The function 'i_return_int()' returns a value, but this value is never used.
>> The function 'i_return_int()' returns a value that will be discarded if not used.

0 comments on commit 5bdd883

Please sign in to comment.