diff options
author | clayjohn <claynjohn@gmail.com> | 2022-10-13 10:31:12 -0700 |
---|---|---|
committer | clayjohn <claynjohn@gmail.com> | 2022-10-13 11:56:45 -0700 |
commit | be1e9acb7cf8d14b3aa21ee34f6c08625743e1d3 (patch) | |
tree | 9e8a8a11e36c9466fdc903842c9af50eebcdc331 /modules/gdscript/tests | |
parent | 042e81f663d31c5d0c619349be14919a39333023 (diff) |
Implement RETURN_VALUE_DISCARDED warning in GDscript
Diffstat (limited to 'modules/gdscript/tests')
-rw-r--r-- | modules/gdscript/tests/scripts/parser/features/class.gd | 4 | ||||
-rw-r--r-- | modules/gdscript/tests/scripts/parser/warnings/return_value_discarded.out | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/modules/gdscript/tests/scripts/parser/features/class.gd b/modules/gdscript/tests/scripts/parser/features/class.gd index 6652f85ad9..af24b32322 100644 --- a/modules/gdscript/tests/scripts/parser/features/class.gd +++ b/modules/gdscript/tests/scripts/parser/features/class.gd @@ -21,5 +21,5 @@ func test(): assert(test_sub.number == 25) # From Test. assert(test_sub.other_string == "bye") # From TestSub. - TestConstructor.new() - TestConstructor.new(500) + var _test_constructor = TestConstructor.new() + _test_constructor = TestConstructor.new(500) 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 d73c5eb7cd..13f759dd46 100644 --- a/modules/gdscript/tests/scripts/parser/warnings/return_value_discarded.out +++ b/modules/gdscript/tests/scripts/parser/warnings/return_value_discarded.out @@ -1 +1,5 @@ GDTEST_OK +>> WARNING +>> Line: 6 +>> RETURN_VALUE_DISCARDED +>> The function 'i_return_int()' returns a value, but this value is never used. |