Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1502)

Unified Diff: pkg/kernel/testcases/closures/catch.dart.expect

Issue 2561723003: Merge kernel closure conversion into the Dart SDK (Closed)
Patch Set: Remove path constraint Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/kernel/testcases/closures/catch.dart ('k') | pkg/kernel/testcases/closures/closures.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/kernel/testcases/closures/catch.dart.expect
diff --git a/pkg/kernel/testcases/closures/catch.dart.expect b/pkg/kernel/testcases/closures/catch.dart.expect
new file mode 100644
index 0000000000000000000000000000000000000000..1081d5b640ca72e4fccc5c5119c599a61dacb829
--- /dev/null
+++ b/pkg/kernel/testcases/closures/catch.dart.expect
@@ -0,0 +1,34 @@
+library;
+import self as self;
+import "dart:core" as core;
+import "dart:mock" as mock;
+
+class Closure#main#function extends core::Object implements core::Function {
+ field core::String note = "This is temporary. The VM doesn't need closure classes.";
+ field mock::Context context;
+ constructor •(final mock::Context context) → dynamic
+ : self::Closure#main#function::context = context
+ ;
+ method call() → dynamic {
+ "This is a temporary solution. In the VM, this will become an additional parameter.";
+ final mock::Context #contextParameter = this.{self::Closure#main#function::context};
+ core::print(#contextParameter.[](0));
+ if(!#contextParameter.[](1).==(null))
+ core::print(#contextParameter.[](1));
+ }
+}
+static method main() → dynamic {
+ dynamic c;
+ try {
+ throw "Fisk";
+ }
+ on core::String catch(dynamic #t1, dynamic #t2) {
+ final mock::Context #context = new mock::Context::•(2);
+ #context.parent = null;
+ #context.[]=(0, #t1);
+ #context.[]=(1, #t2);
+ c = new self::Closure#main#function::•(#context);
+ }
+ c.call();
+ core::print("TEST PASSED");
+}
« no previous file with comments | « pkg/kernel/testcases/closures/catch.dart ('k') | pkg/kernel/testcases/closures/closures.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698