diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-11-03 17:29:18 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-11-03 17:29:18 +0800 |
commit | 7b76328600dd9bc5206f38a549da9e4f99c9ff84 (patch) | |
tree | 979dccdcb4c29a2f8e57f0730c0ff58b827b1af8 /test/diagnostics/init.lua | |
parent | ed6011c30754bfaa646f5a9a819f20f1f32cbfba (diff) | |
download | lua-language-server-7b76328600dd9bc5206f38a549da9e4f99c9ff84.zip |
#687 `---@nodiscard`
Diffstat (limited to 'test/diagnostics/init.lua')
-rw-r--r-- | test/diagnostics/init.lua | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/diagnostics/init.lua b/test/diagnostics/init.lua index 57c28bbb..d1d0f68f 100644 --- a/test/diagnostics/init.lua +++ b/test/diagnostics/init.lua @@ -1408,3 +1408,22 @@ end return nil end) ]] + +TEST [[ +---@nodiscard +local function f() + return 1 +end + +<!f()!> +]] + + +TEST [[ +---@nodiscard +local function f() + return 1 +end + +X = f() +]] |