From 679b32f9ad2999fb71fef335ce48b9a909f9937d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Wed, 9 Nov 2022 00:09:13 +0800 Subject: fix #1677 --- test/type_inference/init.lua | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'test/type_inference') diff --git a/test/type_inference/init.lua b/test/type_inference/init.lua index 6032cd0f..40f9891d 100644 --- a/test/type_inference/init.lua +++ b/test/type_inference/init.lua @@ -3947,3 +3947,21 @@ end local = f(true) ]] + +TEST 'number' [[ +---@class A +---@field [1] number +---@field [2] boolean +local t + +local = t[1] +]] + +TEST 'boolean' [[ +---@class A +---@field [1] number +---@field [2] boolean +local t + +local = t[2] +]] -- cgit v1.2.3