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

Side by Side Diff: pkg/kernel/testcases/closures/named_closure.dart.expect

Issue 2767773004: Add Vector type to Kernel (Closed)
Patch Set: Reformat comment with Markdown, throw exception in type propagation Created 3 years, 8 months 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 unified diff | Download patch
OLDNEW
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 Closure#main#g extends core::Object implements core::Function { 5 class Closure#main#g extends core::Object implements core::Function {
7 field core::String note = "This is temporary. The VM doesn't need closure clas ses."; 6 field core::String note = "This is temporary. The VM doesn't need closure clas ses.";
8 field mock::Context context; 7 field Vector context;
9 constructor •(final mock::Context context) → dynamic 8 constructor •(final Vector context) → dynamic
10 : self::Closure#main#g::context = context 9 : self::Closure#main#g::context = context
11 ; 10 ;
12 method call(dynamic x) → dynamic { 11 method call(dynamic x) → dynamic {
13 "This is a temporary solution. In the VM, this will become an additional par ameter."; 12 "This is a temporary solution. In the VM, this will become an additional par ameter.";
14 final mock::Context #contextParameter = this.{self::Closure#main#g::context} ; 13 final Vector #contextParameter = this.{self::Closure#main#g::context};
15 return #contextParameter.[](0).[](x); 14 return (#contextParameter[1]).[](x);
16 } 15 }
17 } 16 }
18 static field dynamic f = null; 17 static field dynamic f = null;
19 static method foo() → dynamic { 18 static method foo() → dynamic {
20 core::print(self::f.call(0)); 19 core::print(self::f.call(0));
21 } 20 }
22 static method main(dynamic arguments) → dynamic { 21 static method main(dynamic arguments) → dynamic {
23 final mock::Context #context = new mock::Context::•(1); 22 final Vector #context = MakeVector(2);
24 #context.[]=(0, arguments); 23 #context[1] = arguments;
25 final (dynamic) → dynamic g = new self::Closure#main#g::•(#context); 24 final (dynamic) → dynamic g = new self::Closure#main#g::•(#context);
26 self::f = g; 25 self::f = g;
27 self::foo(); 26 self::foo();
28 } 27 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698