diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-11-02 15:51:24 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-11-02 15:51:24 +0800 |
commit | 3bf48c900605681216ce7c14cfe0cb43e583de4f (patch) | |
tree | 6bbea2d1f3455072de6c7f6418e24cca27d518d2 /script/vm/compiler.lua | |
parent | dd972c9071f9dd61550c1ce15cc3f9a6a2b08634 (diff) | |
download | lua-language-server-3bf48c900605681216ce7c14cfe0cb43e583de4f.zip |
infer parameter type when function in table
resolve #1332
Diffstat (limited to 'script/vm/compiler.lua')
-rw-r--r-- | script/vm/compiler.lua | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/script/vm/compiler.lua b/script/vm/compiler.lua index 52f1083b..03a34dbd 100644 --- a/script/vm/compiler.lua +++ b/script/vm/compiler.lua @@ -1108,6 +1108,12 @@ local compilerSwitch = util.switch() end end end + + -- { f = function (<?x?>) end } + if source.parent.type == 'tablefield' + or source.parent.type == 'tableindex' then + vm.setNode(source, vm.compileNode(source.parent)) + end end) : case 'paren' : call(function (source) |