| 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 C<T extends core::Object, S extends core::Object> extends core::Object { | 6 class C<T extends core::Object, S extends core::Object> extends core::Object { |
| 7 constructor internal() → void | 7 constructor internal() → void |
| 8 : super core::Object::•() | 8 : super core::Object::•() |
| 9 ; | 9 ; |
| 10 method foo(self::C::S s) → dynamic { | 10 method foo(self::C::S s) → dynamic { |
| 11 final mock::Context #context = new mock::Context::•(1); | 11 final mock::Context #context = new mock::Context::•(1); |
| 12 #context.parent = null; | 12 #context.parent = null; |
| 13 #context.[]=(0, this); | 13 #context.[]=(0, this); |
| 14 return new self::Closure#C#foo#function::•<self::C::T, self::C::S>(#context)
; | 14 return new self::Closure#C#foo#function::•<self::C::T, self::C::S>(#context)
; |
| 15 } | 15 } |
| 16 method bar() → dynamic { |
| 17 self::C<self::C::T, self::C::S> self = this; |
| 18 } |
| 16 method baz() → dynamic { | 19 method baz() → dynamic { |
| 17 return new self::Closure#C#baz#function::•<self::C::T, self::C::S>(null); | 20 return new self::Closure#C#baz#function::•<self::C::T, self::C::S>(null); |
| 18 } | 21 } |
| 19 static factory •<T extends core::Object, S extends core::Object>() → self::C<s
elf::C::•::T, self::C::•::S> { | 22 static factory •<T extends core::Object, S extends core::Object>() → self::C<s
elf::C::•::T, self::C::•::S> { |
| 20 final () → dynamic local = new self::Closure#C#function#local::•<self::C::•:
:T, self::C::•::S>(null); | 23 final () → dynamic local = new self::Closure#C#function#local::•<self::C::•:
:T, self::C::•::S>(null); |
| 21 return local.call(); | 24 return local.call(); |
| 22 } | 25 } |
| 23 } | 26 } |
| 24 class Closure#C#foo#function<T extends core::Object, S extends core::Object> ext
ends core::Object implements core::Function { | 27 class Closure#C#foo#function<T extends core::Object, S extends core::Object> ext
ends core::Object implements core::Function { |
| 25 field core::String note = "This is temporary. The VM doesn't need closure clas
ses."; | 28 field core::String note = "This is temporary. The VM doesn't need closure clas
ses."; |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 static method main(dynamic arguments) → dynamic { | 79 static method main(dynamic arguments) → dynamic { |
| 77 core::print(self::C::•<core::String, core::String>().foo(null).call(arguments.
first)); | 80 core::print(self::C::•<core::String, core::String>().foo(null).call(arguments.
first)); |
| 78 dynamic c = self::C::•<core::int, core::int>().baz().call().call(); | 81 dynamic c = self::C::•<core::int, core::int>().baz().call().call(); |
| 79 if(!(c is self::C<core::int, core::int>)) | 82 if(!(c is self::C<core::int, core::int>)) |
| 80 throw "${c} fails type test 'is C<int, int>'"; | 83 throw "${c} fails type test 'is C<int, int>'"; |
| 81 if(c is self::C<core::String, core::String>) { | 84 if(c is self::C<core::String, core::String>) { |
| 82 throw "${c} passes type test 'is C<String, String>'"; | 85 throw "${c} passes type test 'is C<String, String>'"; |
| 83 } | 86 } |
| 84 core::print(c); | 87 core::print(c); |
| 85 } | 88 } |
| OLD | NEW |