Skip to content

Commit 3f300fc

Browse files
committed
fix #550
1 parent ed32c90 commit 3f300fc

File tree

3 files changed

+14
-3
lines changed

3 files changed

+14
-3
lines changed

changelog.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# changelog
22

3+
## 2.0.4
4+
* `FIX` [#550](https://github.com./sumneko/lua-language-server/issues/550)
5+
36
## 2.0.3
47
`2021-6-24`
58
* `CHG` improve memory usage

script/core/completion.lua

-3
Original file line numberDiff line numberDiff line change
@@ -1389,9 +1389,6 @@ local function checkTableLiteralFieldByCall(ast, text, offset, call, defs, index
13891389
and (not source.parent or source.parent.type ~= 'table') then
13901390
return
13911391
end
1392-
if call.node and call.node.type == 'getmethod' then
1393-
index = index + 1
1394-
end
13951392
local mark = {}
13961393
local fields = {}
13971394
local tbl = source

test/completion/init.lua

+11
Original file line numberDiff line numberDiff line change
@@ -2463,6 +2463,17 @@ api({$})
24632463
]]
24642464
(EXISTS)
24652465

2466+
TEST [[
2467+
---@class A
2468+
---@field a '"hello"'|'"world"'
2469+
2470+
---@param t A
2471+
function m:api(t) end
2472+
2473+
m:api({$})
2474+
]]
2475+
(EXISTS)
2476+
24662477
TEST [[
24672478
---@class AAA.BBB
24682479

0 commit comments

Comments
 (0)