mirror of
https://github.com/godotengine/godot.git
synced 2025-10-20 00:13:30 +00:00
change RETURN_VALUE_DISCARDED GDScript warn text
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.
This commit is contained in:
parent
895428c805
commit
5bdd883dfd
2 changed files with 2 additions and 2 deletions
|
@ -96,7 +96,7 @@ String GDScriptWarning::get_message() const {
|
||||||
} break;
|
} break;
|
||||||
case RETURN_VALUE_DISCARDED: {
|
case RETURN_VALUE_DISCARDED: {
|
||||||
CHECK_SYMBOLS(1);
|
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;
|
} break;
|
||||||
case PROPERTY_USED_AS_FUNCTION: {
|
case PROPERTY_USED_AS_FUNCTION: {
|
||||||
CHECK_SYMBOLS(2);
|
CHECK_SYMBOLS(2);
|
||||||
|
|
|
@ -2,4 +2,4 @@ GDTEST_OK
|
||||||
>> WARNING
|
>> WARNING
|
||||||
>> Line: 6
|
>> Line: 6
|
||||||
>> RETURN_VALUE_DISCARDED
|
>> 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.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue