diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-04-14 15:04:16 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-04-14 15:04:16 +0800 |
commit | bae265094084e3b1887b92402de0cf2be14abb5d (patch) | |
tree | 842ee6ba352885a0a4478dfb52922580dc0e2367 /script/vm/sign.lua | |
parent | 73a4780aa866737851040239eee52a013b5401d0 (diff) | |
download | lua-language-server-bae265094084e3b1887b92402de0cf2be14abb5d.zip |
update
Diffstat (limited to 'script/vm/sign.lua')
-rw-r--r-- | script/vm/sign.lua | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/script/vm/sign.lua b/script/vm/sign.lua index ca326965..2d45a5a7 100644 --- a/script/vm/sign.lua +++ b/script/vm/sign.lua @@ -54,21 +54,21 @@ function mt:resolve(uri, args) for _, ufield in ipairs(object.fields) do local ufieldNode = vm.compileNode(ufield.name) local uvalueNode = vm.compileNode(ufield.extends) - if ufieldNode[1].type == 'doc.generic.name' and uvalueNode[1].type == 'doc.generic.name' then + if ufieldNode:get(1).type == 'doc.generic.name' and uvalueNode:get(1).type == 'doc.generic.name' then -- { [number]: number} -> { [K]: V } local tfieldNode = vm.getTableKey(uri, node, 'any') local tvalueNode = vm.getTableValue(uri, node, 'any') - resolve(ufieldNode[1], tfieldNode) - resolve(uvalueNode[1], tvalueNode) + resolve(ufieldNode:get(1), tfieldNode) + resolve(uvalueNode:get(1), tvalueNode) else - if ufieldNode[1].type == 'doc.generic.name' then + if ufieldNode:get(1).type == 'doc.generic.name' then -- { [number]: number}|number[] -> { [K]: number } local tnode = vm.getTableKey(uri, node, uvalueNode) - resolve(ufieldNode[1], tnode) - elseif uvalueNode[1].type == 'doc.generic.name' then + resolve(ufieldNode:get(1), tnode) + elseif uvalueNode:get(1).type == 'doc.generic.name' then -- { [number]: number}|number[] -> { [number]: V } local tnode = vm.getTableValue(uri, node, ufieldNode) - resolve(uvalueNode[1], tnode) + resolve(uvalueNode:get(1), tnode) end end end |