From 02f6831344efd3a32c0ac8a1fbd0d00af3dec671 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Mon, 30 Jan 2023 12:38:03 +0800 Subject: fix wrong infer of tableindex #1831 --- test/hover/init.lua | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'test/hover/init.lua') 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 = { + [enum.a] = true, + [enum.b] = 2, + [3] = {} +} +]] +[[ +local t: { + [1]: boolean = true, + [2]: integer = 2, + [3]: table, +} +]] -- cgit v1.2.3