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 import "dart:mock" as mock; | 4 import "dart:mock" as mock; |
5 | 5 |
6 class Closure#main#foo#bar extends core::Object implements core::Function { | 6 class Closure#main#foo#bar extends core::Object implements core::Function { |
7 field core::String note = "This is temporary. The VM doesn't need closure clas
ses."; | 7 field core::String note = "This is temporary. The VM doesn't need closure clas
ses."; |
8 field mock::Context context; | 8 field mock::Context context; |
9 constructor •(final mock::Context context) → dynamic | 9 constructor •(final mock::Context context) → dynamic |
10 : self::Closure#main#foo#bar::context = context | 10 : self::Closure#main#foo#bar::context = context |
11 ; | 11 ; |
12 method call() → dynamic { | 12 method call() → dynamic { |
13 "This is a temporary solution. In the VM, this will become an additional par
ameter."; | 13 "This is a temporary solution. In the VM, this will become an additional par
ameter."; |
14 final mock::Context #contextParameter = this.{self::Closure#main#foo#bar::co
ntext}; | 14 final mock::Context #contextParameter = this.{self::Closure#main#foo#bar::co
ntext}; |
15 core::print(#contextParameter.[](0)); | 15 core::print(#contextParameter.[](0)); |
16 } | 16 } |
17 } | 17 } |
18 class Closure#main#foo extends core::Object implements core::Function { | 18 class Closure#main#foo extends core::Object implements core::Function { |
19 field core::String note = "This is temporary. The VM doesn't need closure clas
ses."; | 19 field core::String note = "This is temporary. The VM doesn't need closure clas
ses."; |
20 field mock::Context context; | 20 field mock::Context context; |
21 constructor •(final mock::Context context) → dynamic | 21 constructor •(final mock::Context context) → dynamic |
22 : self::Closure#main#foo::context = context | 22 : self::Closure#main#foo::context = context |
23 ; | 23 ; |
24 method call(dynamic x) → dynamic { | 24 method call(dynamic x) → dynamic { |
25 "This is a temporary solution. In the VM, this will become an additional par
ameter."; | 25 "This is a temporary solution. In the VM, this will become an additional par
ameter."; |
26 final mock::Context #contextParameter = this.{self::Closure#main#foo::contex
t}; | 26 final mock::Context #contextParameter = this.{self::Closure#main#foo::contex
t}; |
27 final mock::Context #context = new mock::Context::•(1); | 27 final mock::Context #context = new mock::Context::•(1); |
28 #context.parent = #contextParameter; | 28 #context.parent = #contextParameter; |
29 #context.[]=(0, null); | 29 #context.[]=(0, null); |
30 final() → dynamic bar = new self::Closure#main#foo#bar::•(#context); | 30 final () → dynamic bar = new self::Closure#main#foo#bar::•(#context); |
31 return bar; | 31 return bar; |
32 } | 32 } |
33 } | 33 } |
34 static method main(core::List<core::String> arguments) → dynamic { | 34 static method main(core::List<core::String> arguments) → dynamic { |
35 final(dynamic) → dynamic foo = new self::Closure#main#foo::•(null); | 35 final (dynamic) → dynamic foo = new self::Closure#main#foo::•(null); |
36 foo.call(arguments.[](0)).call(); | 36 foo.call(arguments.[](0)).call(); |
37 } | 37 } |
OLD | NEW |