summaryrefslogtreecommitdiff
path: root/test/type_inference/init.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-06-20 20:58:56 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-06-20 20:58:56 +0800
commitc65de666e0a3706b921993648910ef531c47c607 (patch)
tree034c07b07b3a4c8109e2f3adb4c6b89b83ae0358 /test/type_inference/init.lua
parenta04cffb43132645f63e5a319f6ca69e0df87dcdb (diff)
downloadlua-language-server-c65de666e0a3706b921993648910ef531c47c607.zip
update
Diffstat (limited to 'test/type_inference/init.lua')
-rw-r--r--test/type_inference/init.lua22
1 files changed, 21 insertions, 1 deletions
diff --git a/test/type_inference/init.lua b/test/type_inference/init.lua
index 3a7b1227..b448e837 100644
--- a/test/type_inference/init.lua
+++ b/test/type_inference/init.lua
@@ -2675,7 +2675,7 @@ local t
local <?x?> = t.x
]]
-TEST 'integer' [[
+TEST 'integer|unknown' [[
local function f()
return GG
end
@@ -2719,3 +2719,23 @@ end
local <?n?> = f()
]]
+
+TEST 'integer' [[
+---@class A
+---@field x integer
+local m
+
+m.<?x?> = true
+
+print(m.x)
+]]
+
+TEST 'integer' [[
+---@class A
+---@field x integer
+local m
+
+m.x = true
+
+print(m.<?x?>)
+]]