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

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

Issue 2998803002: [kernel] Support for top-level generic functions. (Closed)
Patch Set: Review comments. Created 3 years, 4 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 3
4 static method main() → dynamic { 4 static method main() → dynamic {
5 dynamic closure; 5 dynamic closure;
6 { 6 {
7 Vector #context = MakeVector(2); 7 Vector #context = MakeVector(3);
8 #context[1] = 0; 8 #context[2] = 0;
9 dynamic fn = MakeClosure<() → dynamic>(self::closure#main#function, #context ); 9 dynamic fn = MakeClosure<() → dynamic>(self::closure#main#function, #context );
10 for (; (#context[1]).<(3); #context = CopyVector(#context), #context[1] = (# context[1]).+(1)) { 10 for (; (#context[2]).<(3); #context = CopyVector(#context), #context[2] = (# context[2]).+(1)) {
11 #context[1] = (#context[1]).+(1); 11 #context[2] = (#context[2]).+(1);
12 closure = fn; 12 closure = fn;
13 } 13 }
14 } 14 }
15 dynamic x = closure.call(); 15 dynamic x = closure.call();
16 if(!x.==(1)) { 16 if(!x.==(1)) {
17 throw "Expected 1, but got ${x}."; 17 throw "Expected 1, but got ${x}.";
18 } 18 }
19 } 19 }
20 static method closure#main#function(Vector #contextParameter) → dynamic { 20 static method closure#main#function(Vector #contextParameter) → dynamic {
21 return #contextParameter[1]; 21 return #contextParameter[2];
22 } 22 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698