summaryrefslogtreecommitdiff
path: root/test-beta/references
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-12-17 21:25:29 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-12-17 21:25:29 +0800
commitf76d98823d267951692377fd357c787f81529ab8 (patch)
tree3b75e5c24114fc3fa3e3229b6d398a2230acf556 /test-beta/references
parente3eadcbe69168f0a42bcc843fcaae6bffaadffd9 (diff)
downloadlua-language-server-f76d98823d267951692377fd357c787f81529ab8.zip
暂存
Diffstat (limited to 'test-beta/references')
-rw-r--r--test-beta/references/init.lua15
1 files changed, 15 insertions, 0 deletions
diff --git a/test-beta/references/init.lua b/test-beta/references/init.lua
index a9d75b24..c6727eca 100644
--- a/test-beta/references/init.lua
+++ b/test-beta/references/init.lua
@@ -183,6 +183,21 @@ local <!y!> = f()()
]]
TEST [[
+local <!mt!> = {}
+<!mt!>.<!__index!> = <!mt!>
+
+function <!mt!>:add(a, b)
+end
+
+local function init()
+ return setmetatable({}, <!mt!>)
+end
+
+local <!t!> = init()
+<?t?>:add()
+]]
+
+TEST [[
local mt = {}
mt.__index = mt