Skip to content

Commit ddadd63

Browse files
committed
fix #1345
1 parent f709ab2 commit ddadd63

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969
* `FIX` [#1317](https://github.com/sumneko/lua-language-server/issues/1317)
7070
* `FIX` [#1320](https://github.com/sumneko/lua-language-server/issues/1320)
7171
* `FIX` [#1330](https://github.com/sumneko/lua-language-server/issues/1330)
72+
* `FIX` [#1345](https://github.com/sumneko/lua-language-server/issues/1345)
7273
* `FIX` [#1346](https://github.com/sumneko/lua-language-server/issues/1346)
7374
* `FIX` [#1348](https://github.com/sumneko/lua-language-server/issues/1348)
7475

script/vm/compiler.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -977,6 +977,7 @@ local function compileLocal(source)
977977
vm.setNode(source, vm.compileNode(source.parent.parent.parent.node))
978978
end
979979
end
980+
vm.getNode(source):remove 'function'
980981
end
981982
local hasMarkValue
982983
if not hasMarkDoc and source.value then

test/type_inference/init.lua

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3726,3 +3726,14 @@ local m = {}
37263726
37273727
print(<?m?>)
37283728
]]
3729+
3730+
TEST 'A' [[
3731+
---@class A
3732+
---@overload fun():A
3733+
local m = {}
3734+
3735+
---@return A
3736+
function m:init()
3737+
return <?self?>
3738+
end
3739+
]]

0 commit comments

Comments
 (0)