OLD | NEW |
(Empty) | |
| 1 library; |
| 2 import self as self; |
| 3 import "dart:core" as core; |
| 4 import "dart:mock" as mock; |
| 5 |
| 6 class Closure#main#f extends core::Object implements core::Function { |
| 7 field core::String note = "This is temporary. The VM doesn't need closure clas
ses."; |
| 8 field mock::Context context; |
| 9 constructor •(final mock::Context context) → dynamic |
| 10 : self::Closure#main#f::context = context |
| 11 ; |
| 12 method call() → dynamic { |
| 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#f::context}
; |
| 15 return null; |
| 16 } |
| 17 } |
| 18 class Closure#main#g extends core::Object implements core::Function { |
| 19 field core::String note = "This is temporary. The VM doesn't need closure clas
ses."; |
| 20 field mock::Context context; |
| 21 constructor •(final mock::Context context) → dynamic |
| 22 : self::Closure#main#g::context = context |
| 23 ; |
| 24 method call() → dynamic { |
| 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#g::context}
; |
| 27 return #contextParameter.[](0).call(); |
| 28 } |
| 29 } |
| 30 static method main(dynamic arguments) → dynamic { |
| 31 final mock::Context #context = new mock::Context::•(1); |
| 32 #context.parent = null; |
| 33 #context.[]=(0, new self::Closure#main#f::•(#context)); |
| 34 final dynamic g = new self::Closure#main#g::•(#context); |
| 35 g.call(); |
| 36 } |
OLD | NEW |