diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2020-08-15 16:03:05 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2020-08-15 16:03:05 +0800 |
commit | 0177c2914c223fb6b335bfdccac1f146c2f80a60 (patch) | |
tree | b300422746c7742de358fb0e9aed05dd6bd6e2af /test-beta/crossfile | |
parent | 7970d6ca48f3509c7cfe29a8b81ae7777d6f2556 (diff) | |
download | lua-language-server-0177c2914c223fb6b335bfdccac1f146c2f80a60.zip |
支持 return setmetatable
Diffstat (limited to 'test-beta/crossfile')
-rw-r--r-- | test-beta/crossfile/definition.lua | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/test-beta/crossfile/definition.lua b/test-beta/crossfile/definition.lua index fbeda828..c5601a1f 100644 --- a/test-beta/crossfile/definition.lua +++ b/test-beta/crossfile/definition.lua @@ -521,6 +521,31 @@ TEST { } } +TEST { + { + path = 'a.lua', + content = [[ + local mt = {} + mt.__index = mt + + function mt:<!add!>(a, b) + end + + return function () + return setmetatable({}, mt) + end + ]], + }, + { + path = 'b.lua', + content = [[ + local m = require 'a' + local obj = m() + obj:<?add?>() + ]] + }, +} + --TEST { -- { -- path = 'a.lua', |