summaryrefslogtreecommitdiff
path: root/server/test/definition/method.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2018-12-03 20:29:02 +0800
committer最萌小汐 <sumneko@hotmail.com>2018-12-03 20:29:02 +0800
commit1a78d51e0580bfb19d07353bc7228bad37639839 (patch)
tree3646032cec4d2f1e02813461cca0031535f5a832 /server/test/definition/method.lua
parentab8fe19a04e3ee945401b0de0c4c62050801f1b3 (diff)
downloadlua-language-server-1a78d51e0580bfb19d07353bc7228bad37639839.zip
换个方法实现metatable
Diffstat (limited to 'server/test/definition/method.lua')
-rw-r--r--server/test/definition/method.lua13
1 files changed, 13 insertions, 0 deletions
diff --git a/server/test/definition/method.lua b/server/test/definition/method.lua
index 24e3b3b8..ac9e95e7 100644
--- a/server/test/definition/method.lua
+++ b/server/test/definition/method.lua
@@ -87,3 +87,16 @@ end
local obj = setmetatable({ <!init!> = 1 }, { __index = mt })
]]
+
+TEST [[
+local mt
+function mt:x()
+ self.a.<?out?>()
+end
+
+local obj = setmetatable({
+ a = {
+ <!out!> = 1,
+ }
+}, { __index = mt })
+]]