summaryrefslogtreecommitdiff
path: root/test/diagnostics/close-non-object.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/diagnostics/close-non-object.lua')
-rw-r--r--test/diagnostics/close-non-object.lua18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/diagnostics/close-non-object.lua b/test/diagnostics/close-non-object.lua
new file mode 100644
index 00000000..11b882b7
--- /dev/null
+++ b/test/diagnostics/close-non-object.lua
@@ -0,0 +1,18 @@
+TEST [[
+local _ <close> = <!1!>
+]]
+
+TEST [[
+local _ <close> = <!''!>
+]]
+
+TEST [[
+local c <close> = <!(function () return 1 end)()!>
+]]
+
+TEST [[
+---@type unknown
+local t
+
+local _ <close> = t
+]]