diff options
author | sumneko <sumneko@hotmail.com> | 2019-04-22 14:52:14 +0800 |
---|---|---|
committer | sumneko <sumneko@hotmail.com> | 2019-04-22 14:52:14 +0800 |
commit | efa8bfce8228bc615e2870cbc4394bef0ab3cb9d (patch) | |
tree | c5c89bc67473c1525de1e1d912bab8517f59e7a9 /server/test/definition/method.lua | |
parent | adb221773bbfffcec5e486a8e4f52e44d594508b (diff) | |
download | lua-language-server-efa8bfce8228bc615e2870cbc4394bef0ab3cb9d.zip |
全局值跳转等待编译完成(转到定义超时1秒,查找引用超时5秒)
Diffstat (limited to 'server/test/definition/method.lua')
-rw-r--r-- | server/test/definition/method.lua | 65 |
1 files changed, 34 insertions, 31 deletions
diff --git a/server/test/definition/method.lua b/server/test/definition/method.lua index ad9fea08..08b56f61 100644 --- a/server/test/definition/method.lua +++ b/server/test/definition/method.lua @@ -69,37 +69,40 @@ setmetatable(api, { __index = mt }) api:<?method1?>() ]] ---TEST [[ ---local mt ---function mt:x() --- self.<?init?>() ---end --- ---local obj = setmetatable({}, { __index = mt }) ---obj.<!init!> = 1 ---]] --- ---TEST [[ ---local mt ---function mt:x() --- self.<?init?>() ---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 }) ---]] +TEST [[ +local mt +function mt:x() + self.<?init?>() +end + +local obj = setmetatable({}, { __index = mt }) +obj.<!init!> = 1 +obj:x() +]] + +TEST [[ +local mt +function mt:x() + self.<?init?>() +end + +local obj = setmetatable({ <!init!> = 1 }, { __index = mt }) +obj:x() +]] + +TEST [[ +local mt +function mt:x() + self.a.<?out?>() +end + +local obj = setmetatable({ + a = { + <!out!> = 1, + } +}, { __index = mt }) +obj:x() +]] TEST [[ local sm = setmetatable |