OLD | NEW |
1 library; | 1 library; |
2 import self as self; | 2 import self as self; |
3 import "dart:core" as core; | 3 import "dart:core" as core; |
4 | 4 |
5 static field dynamic f; | 5 static field dynamic f; |
6 static method foo() → dynamic { | 6 static method foo() → dynamic { |
7 core::print(self::f.call(0)); | 7 core::print(self::f.call(0)); |
8 } | 8 } |
9 static method main(dynamic arguments) → dynamic { | 9 static method main(dynamic arguments) → dynamic { |
10 final Vector #context = MakeVector(2); | 10 final Vector #context = MakeVector(3); |
11 #context[1] = arguments; | 11 #context[2] = arguments; |
12 self::f = MakeClosure<(dynamic) → dynamic>(self::closure#main#function, #conte
xt); | 12 self::f = MakeClosure<(dynamic) → dynamic>(self::closure#main#function, #conte
xt); |
13 self::foo(); | 13 self::foo(); |
14 } | 14 } |
15 static method closure#main#function(Vector #contextParameter, dynamic x) → dynam
ic { | 15 static method closure#main#function(Vector #contextParameter, dynamic x) → dynam
ic { |
16 return (#contextParameter[1]).[](x); | 16 return (#contextParameter[2]).[](x); |
17 } | 17 } |
OLD | NEW |