summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-10-19 14:44:40 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-10-19 14:44:40 +0800
commit2f10d05e4c03cbeae5ec532f4f87861cb87319a7 (patch)
tree4da156fb5a5922e2b0d56852deb9ec1900a1ff96
parent5370e58f0c54f840f423e7b666df301499eca4e7 (diff)
downloadlua-language-server-2f10d05e4c03cbeae5ec532f4f87861cb87319a7.zip
修正
-rw-r--r--server-beta/src/core/getfield.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/server-beta/src/core/getfield.lua b/server-beta/src/core/getfield.lua
index badd41cf..c7d16316 100644
--- a/server-beta/src/core/getfield.lua
+++ b/server-beta/src/core/getfield.lua
@@ -4,7 +4,6 @@ local checkSMT = require 'core.setmetatable'
local m = {}
function m:ref(source, callback)
- local key = guide.getKeyName(source)
local node = source.node
if node.type == 'setfield'
or node.type == 'getfield'
@@ -12,6 +11,7 @@ function m:ref(source, callback)
or node.type == 'getmethod'
or node.type == 'setindex'
or node.type == 'getindex' then
+ local key = guide.getKeyName(node)
self:eachField(node.node, key, function (src, mode)
if mode == 'set' or mode == 'get' then
callback(src, mode)