OLD | NEW |
| (Empty) |
1 class Callable { | |
2 call(x) { | |
3 return "string"; | |
4 } | |
5 } | |
6 | |
7 class CallableGetter { | |
8 get call => new Callable(); | |
9 } | |
10 | |
11 main() { | |
12 var closure = (x) => x; | |
13 var int1 = closure(1); | |
14 var int2 = closure.call(1); | |
15 var int3 = closure.call.call(1); | |
16 var int4 = closure.call.call.call(1); | |
17 | |
18 var callable = new Callable(); | |
19 var string1 = callable(1); | |
20 var string2 = callable.call(1); | |
21 var string3 = callable.call.call(1); | |
22 var string4 = callable.call.call.call(1); | |
23 | |
24 var callableGetter = new CallableGetter(); | |
25 var string5 = callableGetter(1); | |
26 var string6 = callableGetter.call(1); | |
27 var string7 = callableGetter.call.call(1); | |
28 var string8 = callableGetter.call.call.call(1); | |
29 | |
30 var nothing1 = closure(); | |
31 var nothing2 = closure.call(); | |
32 var nothing3 = closure.call.call(); | |
33 var nothing4 = closure.call.call.call(); | |
34 | |
35 var nothing5 = callable(); | |
36 var nothing6 = callable.call(); | |
37 var nothing7 = callable.call.call(); | |
38 var nothing8 = callable.call.call.call(); | |
39 | |
40 var nothing9 = callableGetter(); | |
41 var nothing10 = callableGetter.call(); | |
42 var nothing11 = callableGetter.call.call(); | |
43 var nothing12 = callableGetter.call.call.call(); | |
44 } | |
OLD | NEW |