summaryrefslogtreecommitdiff
path: root/server/test/definition/method.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2018-12-27 14:15:09 +0800
committer最萌小汐 <sumneko@hotmail.com>2018-12-27 14:15:09 +0800
commit3ebc625883cf956179eae4c77305f75b3d24ebd5 (patch)
tree2199ed286fb80788c798037cd78beeac314793c6 /server/test/definition/method.lua
parent5cf122870c659821929449d64bfc24d5913dbd77 (diff)
downloadlua-language-server-3ebc625883cf956179eae4c77305f75b3d24ebd5.zip
非函数的hover改成新的格式
Diffstat (limited to 'server/test/definition/method.lua')
-rw-r--r--server/test/definition/method.lua28
1 files changed, 28 insertions, 0 deletions
diff --git a/server/test/definition/method.lua b/server/test/definition/method.lua
index 5e90177b..7db4b56d 100644
--- a/server/test/definition/method.lua
+++ b/server/test/definition/method.lua
@@ -111,3 +111,31 @@ end
local obj = sm({}, mt)
obj:<?method1?>()
]]
+
+-- TODO 更换 meta__index 的实现
+-- 表和__index之间不共享child
+-- 编译完成后进行后处理,如果某个field只有读取操作,则将值链接到meta表中
+
+--TEST [[
+--local mt = {}
+--function mt:<!x!>()
+--end
+--
+--local obj = setmetatable({}, {__index = mt})
+--function obj:x()
+--end
+--
+--mt:<?x?>()
+--]]
+--
+--TEST [[
+--local mt = {}
+--function mt:x()
+--end
+--
+--local obj = setmetatable({}, {__index = mt})
+--function obj:<!x!>()
+--end
+--
+--obj:<?x?>()
+--]]