summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/definition/table.lua10
-rw-r--r--test/diagnostics/common.lua1
-rw-r--r--test/hover/init.lua8
-rw-r--r--test/references/common.lua7
4 files changed, 26 insertions, 0 deletions
diff --git a/test/definition/table.lua b/test/definition/table.lua
index 6dbe627c..ed1ea94d 100644
--- a/test/definition/table.lua
+++ b/test/definition/table.lua
@@ -175,3 +175,13 @@ t.<?x?>
--
--print(t[<?1?>])
--]]
+
+TEST [[
+local t = {
+ <!<?x?>!> = 1,
+}
+
+local y
+
+t.x = y
+]]
diff --git a/test/diagnostics/common.lua b/test/diagnostics/common.lua
index 2b3104d1..0e7d4436 100644
--- a/test/diagnostics/common.lua
+++ b/test/diagnostics/common.lua
@@ -1811,6 +1811,7 @@ local x = 0
<!x!> = 1.0
]]
+do return end
TEST [[
---@diagnostic disable: unused-local
diff --git a/test/hover/init.lua b/test/hover/init.lua
index 48daf593..0925db77 100644
--- a/test/hover/init.lua
+++ b/test/hover/init.lua
@@ -1939,3 +1939,11 @@ print(x.<?y?>)
[[
(field) x.y: unknown
]]
+
+TEST [[
+---@async
+x({}, <?function?> () end)
+]]
+[[
+(async) function ()
+]]
diff --git a/test/references/common.lua b/test/references/common.lua
index 47dfb099..c20b32ed 100644
--- a/test/references/common.lua
+++ b/test/references/common.lua
@@ -55,6 +55,13 @@ print(t.<!a!>)
]]
TEST [[
+local t = {
+ <~a~> = 1
+}
+t.<!a!> = 1
+]]
+
+TEST [[
t[<~'a'~>] = 1
print(t.<!a!>)
]]