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

Side by Side Diff: tests/language/constructor11_test.dart

Issue 157813005: Check implicit super call in synthetic constructor. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add more checking. Created 6 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2014, 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 // Check that the implicit super call for synthetic constructors are checked.
6
7 import "package:expect/expect.dart";
8
9 class A {
10 final x;
11 A([this.x = 499]);
12 }
13
14 class B extends A {
15 }
16
17 // ==========
18
19 class X {
20 final x;
21 X([this.x = 42]);
22 }
23
24 class Y extends X {
25 }
26
27 class Z extends Y {
28 Z() : super();
29 }
30
31 // ==============
32
33 class F {
34 final x;
35 F([this.x = 99]);
36 }
37
38 class G extends F {
39 }
40
41 class H extends G {
42 }
43
44 main() {
45 Expect.equals(499, new B().x);
46 Expect.equals(42, new Z().x);
47 Expect.equals(99, new H().x);
48 }
OLDNEW
« tests/language/constructor10_test.dart ('K') | « tests/language/constructor10_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698