| OLD | NEW |
| (Empty) | |
| 1 // Copyright (c) 2015, 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 // SharedOptions=--supermixin |
| 5 |
| 6 import "package:expect/expect.dart"; |
| 7 |
| 8 class B { |
| 9 // 'super' resolves to Object, and in some tests, multiple points in the |
| 10 // inheritance chain. |
| 11 toString() => 'B(' + super.toString() + ')'; |
| 12 } |
| 13 |
| 14 class R { |
| 15 toString() => 'R[' + super.toString() + ']'; |
| 16 } |
| 17 |
| 18 class D extends R with B { |
| 19 toString() => 'D<' + super.toString() + '>'; |
| 20 } |
| 21 |
| 22 class E extends D with B { |
| 23 toString() => 'E{' + super.toString() + '}'; |
| 24 } |
| 25 |
| 26 class F = R with B, B; |
| 27 |
| 28 class G extends F with B { |
| 29 toString() => 'G{' + super.toString() + '}'; |
| 30 } |
| 31 |
| 32 main(){ |
| 33 check(object, String expected) { |
| 34 Expect.equals(expected, object.toString()); |
| 35 } |
| 36 |
| 37 check(new B(), "B(Instance of 'B')"); |
| 38 check(new R(), "R[Instance of 'R']"); |
| 39 check(new D(), "D<B(R[Instance of 'D'])>"); |
| 40 check(new E(), "E{B(D<B(R[Instance of 'E'])>)}"); |
| 41 check(new F(), "B(B(R[Instance of 'F']))"); |
| 42 check(new G(), "G{B(B(B(R[Instance of 'G'])))}"); |
| 43 } |
| OLD | NEW |