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

Side by Side Diff: pkg/kernel/testcases/reify/field_initializer_test.dart

Issue 2697873007: Merge the work on Generic Types Reification from 'dart-lang/reify' repo (Closed)
Patch Set: Create and use common 'kernel/runtime' directory Created 3 years, 10 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 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file.
4
5 library field_initializer_test;
6
7 import 'test_base.dart';
8
9 p(x) {
10 write(x);
11 return x;
12 }
13
14 class A<T> {
15 var a1 = p("a1");
16 var a2;
17
18 A() : a2 = p("a2") {
19 p("A");
20 }
21 }
22
23 class B<T> extends A<T> {
24 var b1 = p("b1");
25 var b2 = p("b2");
26 var b3;
27 var b4;
28
29 B()
30 : b3 = p("b3"),
31 b4 = p("b4"),
32 super() {
33 p("B");
34 }
35 }
36
37 main() {
38 var b = new B();
39 expectOutput("b1\nb2\nb3\nb4\na1\na2\nA\nB");
40 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698