diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2018-12-03 20:29:02 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2018-12-03 20:29:02 +0800 |
commit | 1a78d51e0580bfb19d07353bc7228bad37639839 (patch) | |
tree | 3646032cec4d2f1e02813461cca0031535f5a832 /server/test | |
parent | ab8fe19a04e3ee945401b0de0c4c62050801f1b3 (diff) | |
download | lua-language-server-1a78d51e0580bfb19d07353bc7228bad37639839.zip |
换个方法实现metatable
Diffstat (limited to 'server/test')
-rw-r--r-- | server/test/definition/method.lua | 13 |
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 }) +]] |