diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-04-24 05:11:32 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-04-24 05:11:32 +0800 |
commit | b204411a88f4c36be9e9ce2710f03f2a0295e3a6 (patch) | |
tree | dc551047985165f2e48680c95eab3626ad7712b5 /test/diagnostics | |
parent | afbe46c3090e55ff08302b5306ce6dae99f09c54 (diff) | |
download | lua-language-server-b204411a88f4c36be9e9ce2710f03f2a0295e3a6.zip |
fix #1087
Diffstat (limited to 'test/diagnostics')
-rw-r--r-- | test/diagnostics/common.lua | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/test/diagnostics/common.lua b/test/diagnostics/common.lua index 5f1d01c8..66f85c05 100644 --- a/test/diagnostics/common.lua +++ b/test/diagnostics/common.lua @@ -260,6 +260,15 @@ end TEST [[ ---@param a integer ---@param b integer +local function x(a, b) + return a, b +end +<!x()!> +]] + +TEST [[ +---@param a integer +---@param b integer ---@param ... integer local function x(a, b, ...) return a, b, ... @@ -468,7 +477,7 @@ f(1, 2, 3) ]] TEST [[ -local _ = <!unpack!>() +local _ = <!unpack!> ]] TEST [[ @@ -763,7 +772,9 @@ TEST [[ local function f(x, y) return x, y end -f() + +local _ +f(_, _) ]] TEST [[ @@ -796,7 +807,7 @@ TEST [[ TEST [[ ---@type fun(a: integer) local f -f() +f(1) ]] TEST [[ @@ -923,7 +934,7 @@ TEST [[ local mt function mt:method1() mt.<!method2!>() -- doc.class - self.method1() + self:method1() return self.<!method2!>() -- doc.class.name end ]] @@ -1033,7 +1044,7 @@ return m TEST [[ local m = {} -m.x = io.open() +m.x = io.open('') m.x = nil return m |