diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2018-12-24 14:08:22 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2018-12-24 14:08:22 +0800 |
commit | 3f9ca58f22eeccd30ff1093c9874bfa79d40a29f (patch) | |
tree | b586b48634be67e11da684deff9dfac33d3e5d68 /server/test/hover | |
parent | a723536198162aef5297fa7dc05d20597895bda8 (diff) | |
download | lua-language-server-3f9ca58f22eeccd30ff1093c9874bfa79d40a29f.zip |
换个require的做法
Diffstat (limited to 'server/test/hover')
-rw-r--r-- | server/test/hover/init.lua | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/server/test/hover/init.lua b/server/test/hover/init.lua index 5d0cb068..445e72ba 100644 --- a/server/test/hover/init.lua +++ b/server/test/hover/init.lua @@ -198,3 +198,21 @@ end function x() -> any ]] + +TEST [[ +local mt = {} +mt.__index = mt + +function mt:add(a, b) +end + +local function init() + return setmetatable({}, mt) +end + +local t = init() +t:<?add?>() +]] +[[ +function mt:add(a: any, b: any) +]] |