diff options
Diffstat (limited to 'test/diagnostics/discard-returns.lua')
-rw-r--r-- | test/diagnostics/discard-returns.lua | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/diagnostics/discard-returns.lua b/test/diagnostics/discard-returns.lua new file mode 100644 index 00000000..2e348390 --- /dev/null +++ b/test/diagnostics/discard-returns.lua @@ -0,0 +1,17 @@ +TEST [[ +---@nodiscard +local function f() + return 1 +end + +<!f()!> +]] + +TEST [[ +---@nodiscard +local function f() + return 1 +end + +X = f() +]] |