diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2018-12-27 14:38:21 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2018-12-27 14:38:21 +0800 |
commit | b6d7606f817c8cc3e93c69d2b99d120d80f0b856 (patch) | |
tree | e7799e0d270f0dc58876b9c7b3581da3c4633b43 /server/test/hover | |
parent | 3ebc625883cf956179eae4c77305f75b3d24ebd5 (diff) | |
download | lua-language-server-b6d7606f817c8cc3e93c69d2b99d120d80f0b856.zip |
显示表里的值
Diffstat (limited to 'server/test/hover')
-rw-r--r-- | server/test/hover/init.lua | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/server/test/hover/init.lua b/server/test/hover/init.lua index ceaca791..17913039 100644 --- a/server/test/hover/init.lua +++ b/server/test/hover/init.lua @@ -257,3 +257,39 @@ TEST [[ (<?'xxx'?>):sub() ]] (nil) + +TEST [[ +local <?t?> = { + a = 1, + b = 2, + c = 3, +} +]] +[[ +local t: { + a: number = 1, + b: number = 2, + c: number = 3, +} +]] + +TEST [[ +local <?t?> = { + a = 1, + [1] = 2, + [true] = 3, + [5.5] = 4, + [{}] = 5, + [function () end] = 6, +} +]] +[[ +local t: { + a: number = 1, + [1]: number = 2, + [true]: number = 3, + [5.5]: number = 4, + [*table]: number = 5, + [*function]: number = 6, +} +]] |