Index: pkg/kernel/testcases/closures/field.dart.expect |
diff --git a/pkg/kernel/testcases/closures/field.dart.expect b/pkg/kernel/testcases/closures/field.dart.expect |
index 2a2d39ae62373bfe1c121dab4a17156994e57b18..c0d45fcab4fef2ff4d54973df2fe98ecccdccbc3 100644 |
--- a/pkg/kernel/testcases/closures/field.dart.expect |
+++ b/pkg/kernel/testcases/closures/field.dart.expect |
@@ -3,62 +3,14 @@ import self as self; |
import "dart:core" as core; |
class C<T extends core::Object> extends core::Object { |
- field dynamic v = new self::Closure#C#v#function::•<self::C::T>(null); |
- final field dynamic y = new self::Closure#C#y#function::•(null); |
- static final field dynamic z = new self::Closure#C#z#function::•(null); |
+ field dynamic v = MakeClosure<(dynamic) → dynamic>(self::closure#C#v#function, null); |
+ final field dynamic y = MakeClosure<() → dynamic>(self::closure#C#y#function, null); |
+ static final field dynamic z = MakeClosure<() → dynamic>(self::closure#C#z#function, null); |
constructor •() → void |
: super core::Object::•() |
; |
} |
-class Closure#C#v#function<T extends core::Object> extends core::Object implements core::Function { |
- field core::String note = "This is temporary. The VM doesn't need closure classes."; |
- field Vector context; |
- constructor •(final Vector context) → dynamic |
- : self::Closure#C#v#function::context = context |
- ; |
- method call(dynamic x) → dynamic { |
- "This is a temporary solution. In the VM, this will become an additional parameter."; |
- final Vector #contextParameter = this.{self::Closure#C#v#function::context}; |
- return x is self::Closure#C#v#function::T; |
- } |
-} |
-class Closure#C#y#function extends core::Object implements core::Function { |
- field core::String note = "This is temporary. The VM doesn't need closure classes."; |
- field Vector context; |
- constructor •(final Vector context) → dynamic |
- : self::Closure#C#y#function::context = context |
- ; |
- method call() → dynamic { |
- "This is a temporary solution. In the VM, this will become an additional parameter."; |
- final Vector #contextParameter = this.{self::Closure#C#y#function::context}; |
- return "y"; |
- } |
-} |
-class Closure#C#z#function extends core::Object implements core::Function { |
- field core::String note = "This is temporary. The VM doesn't need closure classes."; |
- field Vector context; |
- constructor •(final Vector context) → dynamic |
- : self::Closure#C#z#function::context = context |
- ; |
- method call() → dynamic { |
- "This is a temporary solution. In the VM, this will become an additional parameter."; |
- final Vector #contextParameter = this.{self::Closure#C#z#function::context}; |
- return "z"; |
- } |
-} |
-class Closure#x#function extends core::Object implements core::Function { |
- field core::String note = "This is temporary. The VM doesn't need closure classes."; |
- field Vector context; |
- constructor •(final Vector context) → dynamic |
- : self::Closure#x#function::context = context |
- ; |
- method call() → dynamic { |
- "This is a temporary solution. In the VM, this will become an additional parameter."; |
- final Vector #contextParameter = this.{self::Closure#x#function::context}; |
- return "x"; |
- } |
-} |
-static field dynamic x = new self::Closure#x#function::•(null); |
+static field dynamic x = MakeClosure<() → dynamic>(self::closure#x#function, null); |
static method main() → dynamic { |
if(!new self::C::•<core::String>().v("")) |
throw "C<String>.v false on String"; |
@@ -79,3 +31,15 @@ static method main() → dynamic { |
if(!"z".==(self::C::z.call())) |
throw "z"; |
} |
+static method closure#C#v#function(Vector #contextParameter, dynamic x) → dynamic { |
+ return x is dynamic; |
+} |
+static method closure#C#y#function(Vector #contextParameter) → dynamic { |
+ return "y"; |
+} |
+static method closure#C#z#function(Vector #contextParameter) → dynamic { |
+ return "z"; |
+} |
+static method closure#x#function(Vector #contextParameter) → dynamic { |
+ return "x"; |
+} |