Chromium Code Reviews| Index: tests/language/mixin_illegal_cycles_test.dart |
| diff --git a/tests/language/mixin_illegal_cycles_test.dart b/tests/language/mixin_illegal_cycles_test.dart |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..472581f8366d358c660925888859ab6d91eaf549 |
| --- /dev/null |
| +++ b/tests/language/mixin_illegal_cycles_test.dart |
| @@ -0,0 +1,39 @@ |
| +// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| +// for details. All rights reserved. Use of this source code is governed by a |
| +// BSD-style license that can be found in the LICENSE file. |
| + |
| +class M { } |
| +class M0 extends Object with M0 { } /// 01: compile-time error |
|
ahe
2013/01/23 12:21:52
Move "with M0" to its own line.
kasperl
2013/01/23 12:29:22
Not sure it's really that much better in this case
|
| +typedef M1 = Object with M1; /// 02: compile-time error |
| + |
| +typedef M2 = Object with M3; /// 03: compile-time error |
| +typedef M3 = Object with M2; /// 03: continued |
| + |
| +typedef M4 = Object with M5; /// 04: compile-time error |
| +typedef M5 = Object with M6; /// 04: continued |
| +typedef M6 = Object with M4; /// 04: continued |
| + |
| +class M7 extends Object with M8 { } /// 05: compile-time error |
|
ahe
2013/01/23 12:21:52
Ditto.
|
| +class M8 extends Object with M7 { } /// 05: continued |
|
ahe
2013/01/23 12:21:52
Ditto.
|
| + |
| +typedef M9 = Object with M91; /// 06: compile-time error |
| +typedef M91 = Object with M92; /// 06: continued |
| +typedef M92 = Object with M91; /// 06: continued |
| + |
| +main() { |
| + new M0(); /// 01: continued |
|
ahe
2013/01/23 12:21:52
Remove /// 01: continued
|
| + |
| + new M1(); /// 02: continued |
| + |
| + new M2(); /// 03: continued |
| + new M3(); /// 03: continued |
| + |
| + new M4(); /// 04: continued |
| + new M5(); /// 04: continued |
| + new M6(); /// 04: continued |
| + |
| + new M7(); /// 05: continued |
|
ahe
2013/01/23 12:21:52
Ditto.
|
| + new M8(); /// 05: continued |
|
ahe
2013/01/23 12:21:52
Ditto.
|
| + |
| + new M9(); /// 06: continued |
| +} |