diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-04-23 00:42:10 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-04-23 00:42:10 +0800 |
commit | ec1f746a71dfb981f093bf00322db75d559fd6b6 (patch) | |
tree | 71730d2de455bf7cd8a9481a554a56cddf47f341 /test/diagnostics | |
parent | 6e00db5b51646ad91c5ee5598897cad7f8d65915 (diff) | |
download | lua-language-server-ec1f746a71dfb981f093bf00322db75d559fd6b6.zip |
fix optional parameters
Diffstat (limited to 'test/diagnostics')
-rw-r--r-- | test/diagnostics/common.lua | 13 |
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 |