Skip to content

Commit 7bf57a0

Browse files
committed
fix #1692
1 parent 77b74b1 commit 7bf57a0

File tree

3 files changed

+2
-32
lines changed

3 files changed

+2
-32
lines changed

changelog.md

+2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@
22

33
## 3.6.3
44
* `FIX` [#1684]
5+
* `FIX` [#1692]
56

67
[#1684]: https://github.com/sumneko/lua-language-server/issues/1684
8+
[#1692]: https://github.com/sumneko/lua-language-server/issues/1692
79

810
## 3.6.2
911
`2022-11-10`

script/core/diagnostics/missing-parameter.lua

-20
Original file line numberDiff line numberDiff line change
@@ -29,24 +29,4 @@ return function (uri, callback)
2929
message = lang.script('DIAG_MISS_ARGS', funcArgs, callArgs),
3030
}
3131
end)
32-
33-
---@async
34-
guide.eachSourceType(state.ast, 'function', function (source)
35-
await.delay()
36-
if not source.args then
37-
return
38-
end
39-
local funcArgs = vm.countParamsOfSource(source)
40-
if funcArgs == 0 then
41-
return
42-
end
43-
local myArgs = #source.args
44-
if myArgs < funcArgs then
45-
callback {
46-
start = source.args.start,
47-
finish = source.args.finish,
48-
message = lang.script('DIAG_MISS_ARGS', funcArgs, myArgs),
49-
}
50-
end
51-
end)
5232
end

test/diagnostics/type-check.lua

-12
Original file line numberDiff line numberDiff line change
@@ -1052,18 +1052,6 @@ local function f()
10521052
end
10531053
]]
10541054

1055-
TEST [[
1056-
---@type fun(x: number)
1057-
local function f<!()!>
1058-
end
1059-
]]
1060-
1061-
TEST [[
1062-
---@type fun(x: number)
1063-
local function f(x, <!y!>)
1064-
end
1065-
]]
1066-
10671055
TEST [[
10681056
---@enum Enum
10691057
local t = {

0 commit comments

Comments
 (0)