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 abstract class Mixin1 { |
| 8 var mixin1Field = 1; |
| 9 } |
| 10 |
| 11 abstract class Mixin2 { |
| 12 var mixin2Field = 2; |
| 13 } |
| 14 |
| 15 class A { |
| 16 var superField; |
| 17 A(foo) : superField = foo; |
| 18 } |
| 19 |
| 20 class B extends A with Mixin1, Mixin2 { |
| 21 var field = 4; |
| 22 B(unused) : super(3); |
| 23 } |
| 24 |
| 25 main() { |
| 26 var b = new B(null); |
| 27 Expect.equals(1, b.mixin1Field); |
| 28 Expect.equals(2, b.mixin2Field); |
| 29 Expect.equals(3, b.superField); |
| 30 Expect.equals(4, b.field); |
| 31 } |
OLD | NEW |