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 class X extends core::Object { | 5 class X extends core::Object { |
6 constructor •() → void | 6 constructor •() → void |
7 : super core::Object::•() | 7 : super core::Object::•() |
8 ; | 8 ; |
9 } | 9 } |
10 class A extends core::Object { | 10 class A extends core::Object { |
| 11 field self::X foo; |
| 12 constructor •(self::X i) → void |
| 13 : self::A::foo = let final Vector #context = MakeVector(2) in let dynamic #t
1 = #context[1] = i in (MakeClosure<() → dynamic>(self::closure#A#function#funct
ion, #context)).call(), super core::Object::•() |
| 14 ; |
| 15 } |
| 16 class B extends core::Object { |
11 field self::X foo = null; | 17 field self::X foo = null; |
12 constructor named(self::X foo) → void | 18 constructor named(self::X foo) → void |
13 : super core::Object::•() {} | 19 : super core::Object::•() {} |
14 constructor •(self::X foo) → void | 20 constructor •(self::X foo) → void |
15 : dynamic extracted#0 = () → self::X | 21 : dynamic extracted#0 = let final Vector #context = MakeVector(2) in let dyn
amic #t2 = #context[1] = foo in (MakeClosure<() → dynamic>(self::closure#B#funct
ion#function, #context)).call(), this self::B::named(extracted#0) |
16 throw "Calling unconverted closure at pkg/kernel/testcases/closures_initia
lizers/local_initializers.dart:17:26"; | |
17 .call(), this self::A::named(extracted#0) | |
18 ; | 22 ; |
19 } | 23 } |
20 static method main() → dynamic { | 24 static method main() → dynamic { |
21 self::A a = new self::A::•(new self::X::•()); | 25 self::A a = new self::A::•(new self::X::•()); |
22 a.foo; | 26 a.foo; |
| 27 self::B b = new self::B::•(new self::X::•()); |
| 28 b.foo; |
23 } | 29 } |
| 30 static method closure#A#function#function(Vector #contextParameter) → dynamic { |
| 31 return #contextParameter[1]; |
| 32 } |
| 33 static method closure#B#function#function(Vector #contextParameter) → dynamic { |
| 34 return #contextParameter[1]; |
| 35 } |
OLD | NEW |