| OLD | NEW |
| (Empty) | |
| 1 // Copyright (c) 2013, 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 import "package:expect/expect.dart"; |
| 6 |
| 7 class Base { |
| 8 int i, j; |
| 9 Base.ctor1(int i, this.j) : this.i = i + 7; |
| 10 Base.ctor2(int i, this.j) : this.i = i + 8; |
| 11 } |
| 12 |
| 13 abstract class M { |
| 14 get i; |
| 15 get j; |
| 16 int k = 42; |
| 17 foo() => i + j; |
| 18 } |
| 19 |
| 20 class C extends Base with M { |
| 21 int l = 131; |
| 22 C.ctor1() : super.ctor1(1, 13); |
| 23 C.ctor2() : super.ctor2(1, 13); |
| 24 } |
| 25 |
| 26 main() { |
| 27 C c1 = new C.ctor1(); |
| 28 Expect.equals(8, c1.i); |
| 29 Expect.equals(13, c1.j); |
| 30 Expect.equals(42, c1.k); |
| 31 Expect.equals(131, c1.l); |
| 32 Expect.equals(21, c1.foo()); |
| 33 C c2 = new C.ctor2(); |
| 34 Expect.equals(9, c2.i); |
| 35 Expect.equals(13, c2.j); |
| 36 Expect.equals(42, c2.k); |
| 37 Expect.equals(131, c2.l); |
| 38 Expect.equals(22, c2.foo()); |
| 39 } |
| OLD | NEW |