summaryrefslogtreecommitdiff
path: root/test/definition/method.lua
blob: e4368edb2509bf1204406fcf4043d19242e7233d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
TEST [[
function mt:<!a!>()
end
function mt:b()
    mt:<?a?>()
end
]]

TEST [[
function mt:<!m1!>()
end
function mt:m2()
    self:<?m1?>()
end
]]

TEST [[
function mt:m3()
    mt:<?m4?>()
end
function mt:<!m4!>()
end
]]

TEST [[
function mt:m3()
    self:<?m4?>()
end
function mt:<!m4!>()
end
]]

TEST [[
local mt

function mt:f()
    self.<!x!> = 1
end

mt.<?x?>
]]

TEST [[
function G:f()
    self.<!x!> = 1
end

G.<?x?>
]]

TEST [[
function G.H:f()
    self.<!x!> = 1
end

G.H.<?x?>
]]