diff options
-rw-r--r-- | server/src/core/definition.lua | 15 | ||||
-rw-r--r-- | server/src/vm/function.lua | 1 |
2 files changed, 8 insertions, 8 deletions
diff --git a/server/src/core/definition.lua b/server/src/core/definition.lua index 9b4b7233..b348a386 100644 --- a/server/src/core/definition.lua +++ b/server/src/core/definition.lua @@ -95,11 +95,12 @@ end local function parseLocal(vm, source, lsp) local positions = {} local loc = source:bindLocal() - if loc:get 'arg' then + local locSource = loc:getSource() + if locSource:get 'arg' then positions[#positions+1] = { - loc:get 'arg'.start, - loc:get 'arg'.finish, - loc:get 'arg':getUri(), + locSource.start, + locSource.finish, + locSource:getUri(), } return positions end @@ -108,9 +109,9 @@ local function parseLocal(vm, source, lsp) return parseValueCrossFile(vm, source, lsp) end positions[#positions+1] = { - loc:getSource().start, - loc:getSource().finish, - loc:getSource():getUri(), + locSource.start, + locSource.finish, + locSource:getUri(), } if #positions == 0 then return nil diff --git a/server/src/vm/function.lua b/server/src/vm/function.lua index 0c13b840..973f984e 100644 --- a/server/src/vm/function.lua +++ b/server/src/vm/function.lua @@ -196,7 +196,6 @@ function mt:createArg(vm, arg) arg:set('arg', true) if arg.type == 'name' then local loc = createLocal(arg[1], arg, createValue('nil', arg)) - loc:set('arg', arg) self:saveLocal(arg[1], loc) self.args[#self.args+1] = loc elseif arg.type == '...' then |