summaryrefslogtreecommitdiff
path: root/test/definition
diff options
context:
space:
mode:
Diffstat (limited to 'test/definition')
-rw-r--r--test/definition/luadoc.lua6
-rw-r--r--test/definition/method.lua26
2 files changed, 32 insertions, 0 deletions
diff --git a/test/definition/luadoc.lua b/test/definition/luadoc.lua
index 19b4421b..47859b15 100644
--- a/test/definition/luadoc.lua
+++ b/test/definition/luadoc.lua
@@ -893,3 +893,9 @@ TEST [[
---@type XXX<<?YYY?>>
]]
+
+TEST [[
+local <!x!>
+
+---@cast <?x?> integer
+]]
diff --git a/test/definition/method.lua b/test/definition/method.lua
index aa7aacdc..e4368edb 100644
--- a/test/definition/method.lua
+++ b/test/definition/method.lua
@@ -29,3 +29,29 @@ end
function mt:<!m4!>()
end
]]
+
+TEST [[
+local mt
+
+function mt:f()
+ self.<!x!> = 1
+end
+
+mt.<?x?>
+]]
+
+TEST [[
+function G:f()
+ self.<!x!> = 1
+end
+
+G.<?x?>
+]]
+
+TEST [[
+function G.H:f()
+ self.<!x!> = 1
+end
+
+G.H.<?x?>
+]]