diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-05-25 02:17:13 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-05-25 02:17:13 +0800 |
commit | 50688a8001325308c30a8669783f1d0e379b463b (patch) | |
tree | 4206bb8792370a6c02f91bf32782cf9645a0b8c0 /test | |
parent | dfab76e01eb592b0cd2625d71a1ef7a859a2aee1 (diff) | |
download | lua-language-server-50688a8001325308c30a8669783f1d0e379b463b.zip |
fix #1150
Diffstat (limited to 'test')
-rw-r--r-- | test/type_inference/init.lua | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/test/type_inference/init.lua b/test/type_inference/init.lua index 947b97b3..5f54cebf 100644 --- a/test/type_inference/init.lua +++ b/test/type_inference/init.lua @@ -2323,3 +2323,29 @@ end local <?z?> = f() ]] + +TEST 'number' [[ +for _ in _ do + ---@type number + local <?x?> +end +]] + +TEST 'unknown' [[ +for _ in _ do + ---@param x number + local <?x?> +end +]] + +TEST 'unknown' [[ +---@type number +for <?x?> in _ do +end +]] + +TEST 'number' [[ +---@param x number +for <?x?> in _ do +end +]] |