blob: 17e61ca5873ae0edf3219ded751589a117f9937a (
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
58
59
60
61
62
63
64
65
66
67
68
|
i, n: int32;
n = 70;
class button
{
x: int32;
p: fn (int32) -> int32;
b: button;
class inner
{
froot ()
{
class huh
{
guf ()
{
x = 3100;
print x;
}
}
new huh().guf();
print 100;
}
}
on_click (f: fn (int32) -> int32)
{
print f (x);
new inner().froot();
p = f;
}
cl (y: int32) -> int32
{
v: int32;
v = y * y;
x += y + v;
print x + y;
return y + 100;
}
bah ()
{
b = new button();
b.on_click (b.cl);
x += b.x;
print x;
}
}
b: button = new button ();
b.bah();
b.on_click (b.cl);
b.on_click (b.cl);
b.on_click (b.cl);
|