| 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; |  | 
| 5 | 4 | 
| 6 class C<T extends core::Object> extends core::Object { | 5 class C<T extends core::Object> extends core::Object { | 
| 7   field dynamic v = new self::Closure#C#v#function::•<self::C::T>(null); | 6   field dynamic v = new self::Closure#C#v#function::•<self::C::T>(null); | 
| 8   final field dynamic y = new self::Closure#C#y#function::•(null); | 7   final field dynamic y = new self::Closure#C#y#function::•(null); | 
| 9   static final field dynamic z = new self::Closure#C#z#function::•(null); | 8   static final field dynamic z = new self::Closure#C#z#function::•(null); | 
| 10   constructor •() → void | 9   constructor •() → void | 
| 11     : super core::Object::•() | 10     : super core::Object::•() | 
| 12     ; | 11     ; | 
| 13 } | 12 } | 
| 14 class Closure#C#v#function<T extends core::Object> extends core::Object implemen
    ts core::Function { | 13 class Closure#C#v#function<T extends core::Object> extends core::Object implemen
    ts core::Function { | 
| 15   field core::String note = "This is temporary. The VM doesn't need closure clas
    ses."; | 14   field core::String note = "This is temporary. The VM doesn't need closure clas
    ses."; | 
| 16   field mock::Context context; | 15   field Vector context; | 
| 17   constructor •(final mock::Context context) → dynamic | 16   constructor •(final Vector context) → dynamic | 
| 18     : self::Closure#C#v#function::context = context | 17     : self::Closure#C#v#function::context = context | 
| 19     ; | 18     ; | 
| 20   method call(dynamic x) → dynamic { | 19   method call(dynamic x) → dynamic { | 
| 21     "This is a temporary solution. In the VM, this will become an additional par
    ameter."; | 20     "This is a temporary solution. In the VM, this will become an additional par
    ameter."; | 
| 22     final mock::Context #contextParameter = this.{self::Closure#C#v#function::co
    ntext}; | 21     final Vector #contextParameter = this.{self::Closure#C#v#function::context}; | 
| 23     return x is self::Closure#C#v#function::T; | 22     return x is self::Closure#C#v#function::T; | 
| 24   } | 23   } | 
| 25 } | 24 } | 
| 26 class Closure#C#y#function extends core::Object implements core::Function { | 25 class Closure#C#y#function extends core::Object implements core::Function { | 
| 27   field core::String note = "This is temporary. The VM doesn't need closure clas
    ses."; | 26   field core::String note = "This is temporary. The VM doesn't need closure clas
    ses."; | 
| 28   field mock::Context context; | 27   field Vector context; | 
| 29   constructor •(final mock::Context context) → dynamic | 28   constructor •(final Vector context) → dynamic | 
| 30     : self::Closure#C#y#function::context = context | 29     : self::Closure#C#y#function::context = context | 
| 31     ; | 30     ; | 
| 32   method call() → dynamic { | 31   method call() → dynamic { | 
| 33     "This is a temporary solution. In the VM, this will become an additional par
    ameter."; | 32     "This is a temporary solution. In the VM, this will become an additional par
    ameter."; | 
| 34     final mock::Context #contextParameter = this.{self::Closure#C#y#function::co
    ntext}; | 33     final Vector #contextParameter = this.{self::Closure#C#y#function::context}; | 
| 35     return "y"; | 34     return "y"; | 
| 36   } | 35   } | 
| 37 } | 36 } | 
| 38 class Closure#C#z#function extends core::Object implements core::Function { | 37 class Closure#C#z#function extends core::Object implements core::Function { | 
| 39   field core::String note = "This is temporary. The VM doesn't need closure clas
    ses."; | 38   field core::String note = "This is temporary. The VM doesn't need closure clas
    ses."; | 
| 40   field mock::Context context; | 39   field Vector context; | 
| 41   constructor •(final mock::Context context) → dynamic | 40   constructor •(final Vector context) → dynamic | 
| 42     : self::Closure#C#z#function::context = context | 41     : self::Closure#C#z#function::context = context | 
| 43     ; | 42     ; | 
| 44   method call() → dynamic { | 43   method call() → dynamic { | 
| 45     "This is a temporary solution. In the VM, this will become an additional par
    ameter."; | 44     "This is a temporary solution. In the VM, this will become an additional par
    ameter."; | 
| 46     final mock::Context #contextParameter = this.{self::Closure#C#z#function::co
    ntext}; | 45     final Vector #contextParameter = this.{self::Closure#C#z#function::context}; | 
| 47     return "z"; | 46     return "z"; | 
| 48   } | 47   } | 
| 49 } | 48 } | 
| 50 class Closure#x#function extends core::Object implements core::Function { | 49 class Closure#x#function extends core::Object implements core::Function { | 
| 51   field core::String note = "This is temporary. The VM doesn't need closure clas
    ses."; | 50   field core::String note = "This is temporary. The VM doesn't need closure clas
    ses."; | 
| 52   field mock::Context context; | 51   field Vector context; | 
| 53   constructor •(final mock::Context context) → dynamic | 52   constructor •(final Vector context) → dynamic | 
| 54     : self::Closure#x#function::context = context | 53     : self::Closure#x#function::context = context | 
| 55     ; | 54     ; | 
| 56   method call() → dynamic { | 55   method call() → dynamic { | 
| 57     "This is a temporary solution. In the VM, this will become an additional par
    ameter."; | 56     "This is a temporary solution. In the VM, this will become an additional par
    ameter."; | 
| 58     final mock::Context #contextParameter = this.{self::Closure#x#function::cont
    ext}; | 57     final Vector #contextParameter = this.{self::Closure#x#function::context}; | 
| 59     return "x"; | 58     return "x"; | 
| 60   } | 59   } | 
| 61 } | 60 } | 
| 62 static field dynamic x = new self::Closure#x#function::•(null); | 61 static field dynamic x = new self::Closure#x#function::•(null); | 
| 63 static method main() → dynamic { | 62 static method main() → dynamic { | 
| 64   if(!new self::C::•<core::String>().v("")) | 63   if(!new self::C::•<core::String>().v("")) | 
| 65     throw "C<String>.v false on String"; | 64     throw "C<String>.v false on String"; | 
| 66   if(new self::C::•<core::String>().v(0)) | 65   if(new self::C::•<core::String>().v(0)) | 
| 67     throw "C<String>.v true on int"; | 66     throw "C<String>.v true on int"; | 
| 68   if(new self::C::•<core::String>().v(null)) | 67   if(new self::C::•<core::String>().v(null)) | 
| 69     throw "C<String>.v true on null"; | 68     throw "C<String>.v true on null"; | 
| 70   if(new self::C::•<core::int>().v("")) | 69   if(new self::C::•<core::int>().v("")) | 
| 71     throw "C<int>.v true on String"; | 70     throw "C<int>.v true on String"; | 
| 72   if(!new self::C::•<core::int>().v(0)) | 71   if(!new self::C::•<core::int>().v(0)) | 
| 73     throw "C<int>.v false on int"; | 72     throw "C<int>.v false on int"; | 
| 74   if(new self::C::•<core::int>().v(null)) | 73   if(new self::C::•<core::int>().v(null)) | 
| 75     throw "C<int>.v true on null"; | 74     throw "C<int>.v true on null"; | 
| 76   if(!"x".==(self::x.call())) | 75   if(!"x".==(self::x.call())) | 
| 77     throw "x"; | 76     throw "x"; | 
| 78   if(!"y".==(new self::C::•<core::String>().y())) | 77   if(!"y".==(new self::C::•<core::String>().y())) | 
| 79     throw "y"; | 78     throw "y"; | 
| 80   if(!"z".==(self::C::z.call())) | 79   if(!"z".==(self::C::z.call())) | 
| 81     throw "z"; | 80     throw "z"; | 
| 82 } | 81 } | 
| OLD | NEW | 
|---|