| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 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 | 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. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 class M0 { | 5 class M0 { |
| 6 factory M0(a,b,c) => null; | 6 factory M0(a, b, c) => null; |
| 7 factory M0.named() => null; | 7 factory M0.named() => null; |
| 8 } | 8 } |
| 9 | 9 |
| 10 class M1 { | 10 class M1 { |
| 11 M1(); | 11 M1(); |
| 12 } | 12 } |
| 13 | 13 |
| 14 class M2 { | 14 class M2 { |
| 15 M2.named(); | 15 M2.named(); |
| 16 } | 16 } |
| 17 | 17 |
| 18 class C0 = Object with M0; | 18 class C0 = Object with M0; |
| 19 class C1 = Object with M1; // //# 01: compile-time error | 19 class C1 = Object with M1; // //# 01: compile-time error |
| 20 class C2 = Object with M2; // //# 02: compile-time error | 20 class C2 = Object with M2; // //# 02: compile-time error |
| 21 class C3 = Object with M0, M1; // //# 03: compile-time error | 21 class C3 = Object with M0, M1; // //# 03: compile-time error |
| 22 class C4 = Object with M1, M0; // //# 04: compile-time error | 22 class C4 = Object with M1, M0; // //# 04: compile-time error |
| 23 class C5 = Object with M0, M2; // //# 05: compile-time error | 23 class C5 = Object with M0, M2; // //# 05: compile-time error |
| 24 class C6 = Object with M2, M0; // //# 06: compile-time error | 24 class C6 = Object with M2, M0; // //# 06: compile-time error |
| 25 | 25 |
| 26 class D0 extends Object with M0 { } | 26 class D0 extends Object with M0 {} |
| 27 class D1 extends Object with M1 { } // //# 07: compile-time error | 27 class D1 extends Object with M1 { } // //# 07: compile-time error |
| 28 class D2 extends Object with M2 { } // //# 08: compile-time error | 28 class D2 extends Object with M2 { } // //# 08: compile-time error |
| 29 class D3 extends Object with M0, M1 { } // //# 09: compile-time error | 29 class D3 extends Object with M0, M1 { } // //# 09: compile-time error |
| 30 class D4 extends Object with M1, M0 { } // //# 10: compile-time error | 30 class D4 extends Object with M1, M0 { } // //# 10: compile-time error |
| 31 class D5 extends Object with M0, M2 { } // //# 11: compile-time error | 31 class D5 extends Object with M0, M2 { } // //# 11: compile-time error |
| 32 class D6 extends Object with M2, M0 { } // //# 12: compile-time error | 32 class D6 extends Object with M2, M0 { } // //# 12: compile-time error |
| 33 | 33 |
| 34 main() { | 34 main() { |
| 35 new C0(); | 35 new C0(); |
| 36 new C1(); // //# 01: continued | 36 new C1(); // //# 01: continued |
| 37 new C2(); // //# 02: continued | 37 new C2(); // //# 02: continued |
| 38 new C3(); // //# 03: continued | 38 new C3(); // //# 03: continued |
| 39 new C4(); // //# 04: continued | 39 new C4(); // //# 04: continued |
| 40 new C5(); // //# 05: continued | 40 new C5(); // //# 05: continued |
| 41 new C6(); // //# 06: continued | 41 new C6(); // //# 06: continued |
| 42 | 42 |
| 43 new D0(); | 43 new D0(); |
| 44 new D1(); // //# 07: continued | 44 new D1(); // //# 07: continued |
| 45 new D2(); // //# 08: continued | 45 new D2(); // //# 08: continued |
| 46 new D3(); // //# 09: continued | 46 new D3(); // //# 09: continued |
| 47 new D4(); // //# 10: continued | 47 new D4(); // //# 10: continued |
| 48 new D5(); // //# 11: continued | 48 new D5(); // //# 11: continued |
| 49 new D6(); // //# 12: continued | 49 new D6(); // //# 12: continued |
| 50 | 50 |
| 51 new C0(1,2,3); // //# 13: static type warning, runtime error | 51 new C0(1,2,3); // //# 13: static type warning, runtime error |
| 52 new C0.named(); // //# 14: static type warning, runtime error | 52 new C0.named(); // //# 14: static type warning, runtime error |
| 53 new D0(1,2,3); // //# 15: static type warning, runtime error | 53 new D0(1,2,3); // //# 15: static type warning, runtime error |
| 54 new D0.named(); // //# 16: static type warning, runtime error | 54 new D0.named(); // //# 16: static type warning, runtime error |
| 55 } | 55 } |
| OLD | NEW |