summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/hover/init.lua15
-rw-r--r--test/type_inference/init.lua7
2 files changed, 22 insertions, 0 deletions
diff --git a/test/hover/init.lua b/test/hover/init.lua
index c16e466d..8058317d 100644
--- a/test/hover/init.lua
+++ b/test/hover/init.lua
@@ -1699,3 +1699,18 @@ print(b.<?x?>)
[[
field A.x: any
]]
+
+TEST [[
+---@class A
+---@field x number
+---@field y number
+
+---@type A<string, number>
+local <?t?>
+]]
+[[
+local t: A<string, number> {
+ x: number,
+ y: number,
+}
+]]
diff --git a/test/type_inference/init.lua b/test/type_inference/init.lua
index 286d47cb..23ebf54e 100644
--- a/test/type_inference/init.lua
+++ b/test/type_inference/init.lua
@@ -353,6 +353,13 @@ TEST 'table<string, number>' [[
local <?x?>
]]
+TEST 'A<string, number>' [[
+---@class A
+
+---@type A<string, number>
+local <?x?>
+]]
+
TEST 'table' [[
self.<?t?>[#self.t+1] = {}
]]