diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-12-17 21:25:29 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-12-17 21:25:29 +0800 |
commit | f76d98823d267951692377fd357c787f81529ab8 (patch) | |
tree | 3b75e5c24114fc3fa3e3229b6d398a2230acf556 /test-beta/references | |
parent | e3eadcbe69168f0a42bcc843fcaae6bffaadffd9 (diff) | |
download | lua-language-server-f76d98823d267951692377fd357c787f81529ab8.zip |
暂存
Diffstat (limited to 'test-beta/references')
-rw-r--r-- | test-beta/references/init.lua | 15 |
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 |