diff options
author | souplamp <camden.mcall@gmail.com> | 2022-11-19 21:16:54 -0600 |
---|---|---|
committer | souplamp <camden.mcall@gmail.com> | 2022-11-21 15:04:04 -0600 |
commit | 5bdd883dfdeb98a68b40b555a10a469e9887d48c (patch) | |
tree | e54cc6b09e77f543214a5b1d57ddba1b1bf0a784 /modules/gdscript | |
parent | 895428c8058ce97abb02a6a3500e463f72a4f9c9 (diff) |
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.
Diffstat (limited to 'modules/gdscript')
-rw-r--r-- | modules/gdscript/gdscript_warning.cpp | 2 | ||||
-rw-r--r-- | modules/gdscript/tests/scripts/parser/warnings/return_value_discarded.out | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/modules/gdscript/gdscript_warning.cpp b/modules/gdscript/gdscript_warning.cpp index a0c107aa53..2548d26e14 100644 --- a/modules/gdscript/gdscript_warning.cpp +++ b/modules/gdscript/gdscript_warning.cpp @@ -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); diff --git a/modules/gdscript/tests/scripts/parser/warnings/return_value_discarded.out b/modules/gdscript/tests/scripts/parser/warnings/return_value_discarded.out index 13f759dd46..e89bb9226f 100644 --- a/modules/gdscript/tests/scripts/parser/warnings/return_value_discarded.out +++ b/modules/gdscript/tests/scripts/parser/warnings/return_value_discarded.out @@ -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. |