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

Side by Side Diff: pkg/kernel/testcases/closures/closure_in_constructor.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 C1 {
ahe 2017/02/27 07:36:06 Add copyright.
karlklose 2017/02/28 11:45:15 Done.
2 var x;
3 C1(y) : x = (() => print('Hello $y'));
4 }
5
6 class C2 {
7 var x;
8 C2(y) {
9 x = () => print('Hello $y');
10 }
11 }
12
13 main() {
14 new C1('hest').x();
15 new C2('naebdyr').x();
ahe 2017/02/27 07:36:06 Nice pick :-)
16 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698