diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-07-11 16:19:44 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-07-11 16:19:44 +0800 |
commit | 2abeaaf81dd8c288a27a2c9638bf5b527ece3463 (patch) | |
tree | 5f2d0b80b997e1f1362af3e17456fa6538125bf2 /test/type_inference | |
parent | 492ed7f90f8fe575c64d4689b2963bd0674da0f9 (diff) | |
download | lua-language-server-2abeaaf81dd8c288a27a2c9638bf5b527ece3463.zip |
fix infers
Diffstat (limited to 'test/type_inference')
-rw-r--r-- | test/type_inference/init.lua | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/type_inference/init.lua b/test/type_inference/init.lua index 3e871499..3a24e5d0 100644 --- a/test/type_inference/init.lua +++ b/test/type_inference/init.lua @@ -3666,3 +3666,17 @@ TEST 'unknown' [[ ---@type _, number local <?x?>, y ]] + +TEST 'number[]' [[ +local t +---@cast t number[]? + +local x = t and <?t?>[i] +]] + +TEST 'number?' [[ +---@type number[]? +local t + +local <?x?> = t and t[i] +]] |