diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-12-01 17:08:38 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-12-01 17:08:38 +0800 |
commit | 018ee6b9d5be0b58ffb04796b3910bf7f1b03e6a (patch) | |
tree | c31bbe473ccbf50b2ad0978410dc396e313207d3 | |
parent | 8581187a7af6fdce6b26a043014827bb078705e5 (diff) | |
download | lua-language-server-018ee6b9d5be0b58ffb04796b3910bf7f1b03e6a.zip |
fix #815
-rw-r--r-- | changelog.md | 1 | ||||
-rw-r--r-- | script/core/noder.lua | 7 | ||||
-rw-r--r-- | test/type_inference/init.lua | 4 |
3 files changed, 12 insertions, 0 deletions
diff --git a/changelog.md b/changelog.md index 0df1e08b..6a447922 100644 --- a/changelog.md +++ b/changelog.md @@ -1,6 +1,7 @@ # changelog ## 2.5.2 +* `FIX` [#815](https://github.com/sumneko/lua-language-server/issues/815) * `FIX` [#825](https://github.com/sumneko/lua-language-server/issues/825) * `FIX` [#827](https://github.com/sumneko/lua-language-server/issues/827) * `FIX` [#837](https://github.com/sumneko/lua-language-server/issues/837) diff --git a/script/core/noder.lua b/script/core/noder.lua index bc2efa70..a3fdd278 100644 --- a/script/core/noder.lua +++ b/script/core/noder.lua @@ -1341,6 +1341,13 @@ compileNodeMap = util.switch() pushForward(noders, id, getID(parent)) end end) + : case 'loop' + : call(function (noders, id, source) + local loc = source.loc + if loc then + pushForward(noders, getID(loc), 'dn:integer') + end + end) : case 'in' : call(function (noders, id, source) local keys = source.keys diff --git a/test/type_inference/init.lua b/test/type_inference/init.lua index 36357771..574c2c12 100644 --- a/test/type_inference/init.lua +++ b/test/type_inference/init.lua @@ -1053,3 +1053,7 @@ f { } } ]] + +TEST 'integer' [[ +for <?i?> = a, b, c do end +]] |