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

Side by Side Diff: pkg/kernel/testcases/closures/catch.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 import "dart:core" as core; 3 import "dart:core" as core;
4 4
5 static method main() → dynamic { 5 static method main() → dynamic {
6 dynamic c; 6 dynamic c;
7 try { 7 try {
8 throw "Fisk"; 8 throw "Fisk";
9 } 9 }
10 on core::String catch(dynamic #t1, dynamic #t2) { 10 on core::String catch(dynamic #t1, dynamic #t2) {
11 final Vector #context = MakeVector(3); 11 final Vector #context = MakeVector(4);
12 #context[1] = #t1; 12 #context[2] = #t1;
13 #context[2] = #t2; 13 #context[3] = #t2;
14 c = MakeClosure<() → dynamic>(self::closure#main#function, #context); 14 c = MakeClosure<() → dynamic>(self::closure#main#function, #context);
15 } 15 }
16 c.call(); 16 c.call();
17 core::print("TEST PASSED"); 17 core::print("TEST PASSED");
18 } 18 }
19 static method closure#main#function(Vector #contextParameter) → dynamic { 19 static method closure#main#function(Vector #contextParameter) → dynamic {
20 core::print(#contextParameter[1]); 20 core::print(#contextParameter[2]);
21 if(!(#contextParameter[2]).==(null)) 21 if(!(#contextParameter[3]).==(null))
22 core::print(#contextParameter[2]); 22 core::print(#contextParameter[3]);
23 } 23 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698