summaryrefslogtreecommitdiff
path: root/test-beta
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-10-30 15:32:11 +0800
committer最萌小汐 <sumneko@hotmail.com>2020-10-30 15:32:11 +0800
commitaca5d65499c3af0fe0d73cd7ce69e7de2248b1e8 (patch)
tree19c2e6d7cb9e699aaa3e1438c4e12c44d430dbe3 /test-beta
parent705e882703b837e44b1c6689d1fd90c7778f2c0f (diff)
downloadlua-language-server-aca5d65499c3af0fe0d73cd7ce69e7de2248b1e8.zip
优化 table 的hover性能
Diffstat (limited to 'test-beta')
-rw-r--r--test-beta/hover/init.lua8
-rw-r--r--test-beta/type_inference/init.lua2
2 files changed, 5 insertions, 5 deletions
diff --git a/test-beta/hover/init.lua b/test-beta/hover/init.lua
index 0e9a9009..78e53bc7 100644
--- a/test-beta/hover/init.lua
+++ b/test-beta/hover/init.lua
@@ -181,7 +181,7 @@ local <?obj?> = setmetatable({}, mt)
]]
[[
local obj: class {
- __index: class,
+ __index: table,
name: string = "class",
}
]]
@@ -196,7 +196,7 @@ local <?obj?> = setmetatable({}, mt)
[[
local obj: class {
TYPE: string = "class",
- __index: class,
+ __index: table,
}
]]
@@ -210,7 +210,7 @@ local <?obj?> = setmetatable({}, mt)
[[
local obj: class {
Class: string = "class",
- __index: class,
+ __index: table,
}
]]
@@ -487,7 +487,7 @@ local <?self?> = setmetatable({
]]
[[
local self: obj {
- __index: obj,
+ __index: table,
__name: string = "obj",
id: integer = 1,
remove: function,
diff --git a/test-beta/type_inference/init.lua b/test-beta/type_inference/init.lua
index 867293f8..6f500f39 100644
--- a/test-beta/type_inference/init.lua
+++ b/test-beta/type_inference/init.lua
@@ -30,7 +30,7 @@ function TEST(wanted)
files.setText('', newScript)
local source = getSource(pos)
assert(source)
- local result = vm.getInferType(source)
+ local result = vm.getInferType(source, 'deep')
assert(wanted == result)
end
end