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

Side by Side Diff: pkg/kernel/testcases/closures/closure_in_initializer_closure.dart

Issue 2712473003: closure conversion: Support closures in initializers (Closed)
Patch Set: Remove parameter Created 3 years, 9 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
(Empty)
1 class C {
ahe 2017/02/27 07:36:06 Add copyright.
karlklose 2017/02/28 11:45:15 Done.
2 var t;
3 C.foo(f) : t = (() {
4 var prefix;
5 var g = (x) {
6 f("$prefix$x");
7 };
8 prefix = 'hest';
9 return g;
10 }) {
11 print(1);
12 }
13 }
14
15 main() {
16 print(0);
17 var c = new C.foo((x) => print(x));
18 print(2);
19 c.t()('fisk');
20 print(3);
21 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698