diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-11-13 02:50:17 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-11-13 02:50:17 +0800 |
commit | 7bf57a0a01d062b90b167e5b5a23227eb90844cd (patch) | |
tree | a5f2a677f79b6224c41194acedd8b762db395da6 | |
parent | 77b74b15643c36a8dbcbe21f288421bf1baa935c (diff) | |
download | lua-language-server-7bf57a0a01d062b90b167e5b5a23227eb90844cd.zip |
fix #1692
-rw-r--r-- | changelog.md | 2 | ||||
-rw-r--r-- | script/core/diagnostics/missing-parameter.lua | 20 | ||||
-rw-r--r-- | test/diagnostics/type-check.lua | 12 |
3 files changed, 2 insertions, 32 deletions
diff --git a/changelog.md b/changelog.md index 8898af80..45b992dd 100644 --- a/changelog.md +++ b/changelog.md @@ -2,8 +2,10 @@ ## 3.6.3 * `FIX` [#1684] +* `FIX` [#1692] [#1684]: https://github.com/sumneko/lua-language-server/issues/1684 +[#1692]: https://github.com/sumneko/lua-language-server/issues/1692 ## 3.6.2 `2022-11-10` diff --git a/script/core/diagnostics/missing-parameter.lua b/script/core/diagnostics/missing-parameter.lua index 1194f6d1..78b94a09 100644 --- a/script/core/diagnostics/missing-parameter.lua +++ b/script/core/diagnostics/missing-parameter.lua @@ -29,24 +29,4 @@ return function (uri, callback) message = lang.script('DIAG_MISS_ARGS', funcArgs, callArgs), } end) - - ---@async - guide.eachSourceType(state.ast, 'function', function (source) - await.delay() - if not source.args then - return - end - local funcArgs = vm.countParamsOfSource(source) - if funcArgs == 0 then - return - end - local myArgs = #source.args - if myArgs < funcArgs then - callback { - start = source.args.start, - finish = source.args.finish, - message = lang.script('DIAG_MISS_ARGS', funcArgs, myArgs), - } - end - end) end diff --git a/test/diagnostics/type-check.lua b/test/diagnostics/type-check.lua index 2547fde3..908920b9 100644 --- a/test/diagnostics/type-check.lua +++ b/test/diagnostics/type-check.lua @@ -1053,18 +1053,6 @@ end ]] TEST [[ ----@type fun(x: number) -local function f<!()!> -end -]] - -TEST [[ ----@type fun(x: number) -local function f(x, <!y!>) -end -]] - -TEST [[ ---@enum Enum local t = { x = 1, |