summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-06-09 15:50:48 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-06-09 15:50:48 +0800
commit3827d18e5b84d5372334ee8151362f935edf8ac4 (patch)
tree9a22b30307942181598132be6131c957d50ddb39 /script
parent037309aa78dfdb73dce73bec767260967b622216 (diff)
downloadlua-language-server-3827d18e5b84d5372334ee8151362f935edf8ac4.zip
#1148 view `table` after erasing alias
Diffstat (limited to 'script')
-rw-r--r--script/vm/infer.lua7
1 files changed, 7 insertions, 0 deletions
diff --git a/script/vm/infer.lua b/script/vm/infer.lua
index 2d8028df..30682f37 100644
--- a/script/vm/infer.lua
+++ b/script/vm/infer.lua
@@ -220,6 +220,13 @@ function mt:_eraseAlias(uri)
if set.type == 'doc.alias' then
if expandAlias then
drop[n.name] = true
+ local newInfer = {}
+ for _, ext in ipairs(set.extends.types) do
+ viewNodeSwitch(ext.type, ext, newInfer)
+ end
+ if newInfer._hasTable then
+ self.views['table'] = true
+ end
else
for _, ext in ipairs(set.extends.types) do
local view = viewNodeSwitch(ext.type, ext, {})