File tree Expand file tree Collapse file tree 4 files changed +29
-2
lines changed Expand file tree Collapse file tree 4 files changed +29
-2
lines changed Original file line number Diff line number Diff line change 1111* ` FIX ` [ #1134 ] ( https://github.com/sumneko/lua-language-server/issues/1134 )
1212* ` FIX ` [ #1141 ] ( https://github.com/sumneko/lua-language-server/issues/1141 )
1313* ` FIX ` [ #1144 ] ( https://github.com/sumneko/lua-language-server/issues/1144 )
14+ * ` FIX ` [ #1150 ] ( https://github.com/sumneko/lua-language-server/issues/1150 )
1415
1516## 3.2.3
1617` 2022-5-16 `
Original file line number Diff line number Diff line change @@ -434,7 +434,7 @@ function m.update(scp, ...)
434434
435435 local news = table.pack (... )
436436 for i = 1 , news .n do
437- if news [i ] then
437+ if type ( news [i ]) == ' table ' then
438438 expand (news [i ])
439439 end
440440 end
Original file line number Diff line number Diff line change 533533-- 该函数有副作用,会给source绑定node!
534534local function bindDocs (source )
535535 local isParam = source .parent .type == ' funcargs'
536- or source .parent .type == ' in'
536+ or ( source .parent .type == ' in' and source . finish <= source . parent . keys . finish )
537537 local docs = source .bindDocs
538538 for i = # docs , 1 , - 1 do
539539 local doc = docs [i ]
Original file line number Diff line number Diff line change @@ -2323,3 +2323,29 @@ end
23232323
23242324local <?z?> = f()
23252325]]
2326+
2327+ TEST ' number' [[
2328+ for _ in _ do
2329+ ---@type number
2330+ local <?x?>
2331+ end
2332+ ]]
2333+
2334+ TEST ' unknown' [[
2335+ for _ in _ do
2336+ ---@param x number
2337+ local <?x?>
2338+ end
2339+ ]]
2340+
2341+ TEST ' unknown' [[
2342+ ---@type number
2343+ for <?x?> in _ do
2344+ end
2345+ ]]
2346+
2347+ TEST ' number' [[
2348+ ---@param x number
2349+ for <?x?> in _ do
2350+ end
2351+ ]]
You can’t perform that action at this time.
0 commit comments