summaryrefslogtreecommitdiff
path: root/script/vm/compiler.lua
diff options
context:
space:
mode:
Diffstat (limited to 'script/vm/compiler.lua')
-rw-r--r--script/vm/compiler.lua8
1 files changed, 7 insertions, 1 deletions
diff --git a/script/vm/compiler.lua b/script/vm/compiler.lua
index 708b4e12..bbc6a333 100644
--- a/script/vm/compiler.lua
+++ b/script/vm/compiler.lua
@@ -731,7 +731,13 @@ local function compileLocalBase(source)
local hasMarkParam
if source.type == 'self' and not hasMarkDoc then
hasMarkParam = true
- vm.setNode(source, vm.compileNode(source.method.node))
+ if source.parent.parent.type == 'call' then
+ -- obj:func(...)
+ vm.setNode(source, vm.compileNode(source.parent.parent.node.node))
+ else
+ -- function obj:func(...)
+ vm.setNode(source, vm.compileNode(source.parent.parent.parent.node))
+ end
end
local hasMarkValue
if source.value then