diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2023-01-30 12:38:03 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2023-01-30 12:38:03 +0800 |
commit | 02f6831344efd3a32c0ac8a1fbd0d00af3dec671 (patch) | |
tree | cee8015a49eebd4da3238ff7c010beea516f3066 /test/hover/init.lua | |
parent | f5d631b87b38a54b8cb40dec602a7f1910fe7e4f (diff) | |
download | lua-language-server-02f6831344efd3a32c0ac8a1fbd0d00af3dec671.zip |
fix wrong infer of tableindex
#1831
Diffstat (limited to 'test/hover/init.lua')
-rw-r--r-- | test/hover/init.lua | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/hover/init.lua b/test/hover/init.lua index a3741764..7521ddf4 100644 --- a/test/hover/init.lua +++ b/test/hover/init.lua @@ -2430,3 +2430,20 @@ local t: { ['y']: integer = 2, } ]] + +TEST [[ +local enum = { a = 1, b = 2 } + +local <?t?> = { + [enum.a] = true, + [enum.b] = 2, + [3] = {} +} +]] +[[ +local t: { + [1]: boolean = true, + [2]: integer = 2, + [3]: table, +} +]] |