File tree Expand file tree Collapse file tree 3 files changed +12
-0
lines changed
Expand file tree Collapse file tree 3 files changed +12
-0
lines changed Original file line number Diff line number Diff line change 33## 3.7.0
44* ` NEW ` support ` ---@type ` and ` --[[@as]] ` for return statement
55* ` FIX ` wrong hover and signature for method with varargs and overloads
6+ * ` FIX ` [ #2155 ]
67* ` FIX ` [ #2224 ]
78
9+ [ #2155 ] : https://github.com/LuaLS/lua-language-server/issues/2155
810[ #2224 ] : https://github.com/LuaLS/lua-language-server/issues/2224
911
1012## 3.6.25
Original file line number Diff line number Diff line change @@ -1112,6 +1112,12 @@ local function compileLocal(source)
11121112 end
11131113 end
11141114
1115+ if source .value
1116+ and source .value .type == ' nil'
1117+ and not myNode :hasKnownType () then
1118+ vm .setNode (source , vm .compileNode (source .value ))
1119+ end
1120+
11151121 myNode .hasDefined = hasMarkDoc or hasMarkParam or hasMarkValue
11161122end
11171123
Original file line number Diff line number Diff line change @@ -44,6 +44,10 @@ function TEST(wanted)
4444 end
4545end
4646
47+ TEST ' nil' [[
48+ local <?t?> = nil
49+ ]]
50+
4751TEST ' string' [[
4852local <?var?> = '111'
4953]]
You can’t perform that action at this time.
0 commit comments