summaryrefslogtreecommitdiff
path: root/test/diagnostics
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-04-23 00:42:10 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-04-23 00:42:10 +0800
commitec1f746a71dfb981f093bf00322db75d559fd6b6 (patch)
tree71730d2de455bf7cd8a9481a554a56cddf47f341 /test/diagnostics
parent6e00db5b51646ad91c5ee5598897cad7f8d65915 (diff)
downloadlua-language-server-ec1f746a71dfb981f093bf00322db75d559fd6b6.zip
fix optional parameters
Diffstat (limited to 'test/diagnostics')
-rw-r--r--test/diagnostics/common.lua13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/diagnostics/common.lua b/test/diagnostics/common.lua
index dc784f28..dca826a1 100644
--- a/test/diagnostics/common.lua
+++ b/test/diagnostics/common.lua
@@ -245,10 +245,22 @@ TEST [[
local function x(a, b)
return a, b
end
+x(1)
+]]
+
+TEST [[
+---@param a integer
+---@param b integer
+local function x(a, b)
+ return a, b
+end
<!x(1)!>
]]
TEST [[
+---@param a integer
+---@param b integer
+---@param ... integer
local function x(a, b, ...)
return a, b, ...
end
@@ -256,6 +268,7 @@ x(1, 2)
]]
TEST [[
+---@param a integer
---@param b? integer
local function x(a, b)
return a, b