diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-06-23 01:38:01 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-06-23 01:38:01 +0800 |
commit | 830165b6025107188e564fc4590e5eb633e1a13d (patch) | |
tree | 9f02dab4a53528de878e6c936fdf1bfb987fd693 /test/type_inference/init.lua | |
parent | 9091e064ab23b6b158551a4d256b65b033cb1688 (diff) | |
download | lua-language-server-830165b6025107188e564fc4590e5eb633e1a13d.zip |
fix
Diffstat (limited to 'test/type_inference/init.lua')
-rw-r--r-- | test/type_inference/init.lua | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/type_inference/init.lua b/test/type_inference/init.lua index 2c17363b..bc497f37 100644 --- a/test/type_inference/init.lua +++ b/test/type_inference/init.lua @@ -2981,3 +2981,20 @@ local n1 = f() local n2 = f(0) local <?n3?> = f(0, 0) ]] + +TEST 'boolean' [[ +---@type {[integer]: boolean, xx: integer} +local t + +local <?n?> = t[1] +]] + +TEST 'boolean' [[ +---@type integer +local i + +---@type {[integer]: boolean, xx: integer} +local t + +local <?n?> = t[i] +]] |