diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-06-23 01:38:01 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-06-23 01:38:01 +0800 |
commit | 830165b6025107188e564fc4590e5eb633e1a13d (patch) | |
tree | 9f02dab4a53528de878e6c936fdf1bfb987fd693 /script/vm/type.lua | |
parent | 9091e064ab23b6b158551a4d256b65b033cb1688 (diff) | |
download | lua-language-server-830165b6025107188e564fc4590e5eb633e1a13d.zip |
fix
Diffstat (limited to 'script/vm/type.lua')
-rw-r--r-- | script/vm/type.lua | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/script/vm/type.lua b/script/vm/type.lua index 1cbda65d..05ada9ea 100644 --- a/script/vm/type.lua +++ b/script/vm/type.lua @@ -153,7 +153,8 @@ function vm.getTableValue(uri, tnode, knode) for tn in tnode:eachObject() do if tn.type == 'doc.type.table' then for _, field in ipairs(tn.fields) do - if vm.isSubType(uri, vm.compileNode(field.name), knode) then + if field.name.type ~= 'doc.field.name' + and vm.isSubType(uri, vm.compileNode(field.name), knode) then if field.extends then result:merge(vm.compileNode(field.extends)) end @@ -202,7 +203,8 @@ function vm.getTableKey(uri, tnode, vnode) for tn in tnode:eachObject() do if tn.type == 'doc.type.table' then for _, field in ipairs(tn.fields) do - if field.extends then + if field.name.type ~= 'doc.field.name' + and field.extends then if vm.isSubType(uri, vm.compileNode(field.extends), vnode) then result:merge(vm.compileNode(field.name)) end |