| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 // SharedOptions=--supermixin | 4 // SharedOptions=--supermixin |
| 5 | 5 |
| 6 // Validate the following test from section 12 ("Mixins") of the spec: | 6 // Validate the following test from section 12 ("Mixins") of the spec: |
| 7 // | 7 // |
| 8 // "Let M_A be a mixin derived from a class M with direct superclass | 8 // "Let M_A be a mixin derived from a class M with direct superclass |
| 9 // S_static. | 9 // S_static. |
| 10 // | 10 // |
| 11 // Let A be an application of M_A. It is a static warning if the | 11 // Let A be an application of M_A. It is a static warning if the |
| 12 // superclass of A is not a subtype of S_static." | 12 // superclass of A is not a subtype of S_static." |
| 13 | 13 |
| 14 class B {} | 14 class B {} |
| 15 class C {} | 15 class C {} |
| 16 class D {} | 16 class D {} |
| 17 class E extends B with C implements D {} | 17 class E extends B with C implements D {} |
| 18 class F extends E {} | 18 class F extends E {} |
| 19 class A extends E with M {} | 19 class A extends E with M {} |
| 20 class M | 20 class M |
| 21 extends B /// 01: ok | 21 extends B //# 01: ok |
| 22 extends C /// 02: static type warning | 22 extends C //# 02: static type warning |
| 23 extends D /// 03: ok | 23 extends D //# 03: ok |
| 24 extends E /// 04: ok | 24 extends E //# 04: ok |
| 25 extends F /// 05: static type warning | 25 extends F //# 05: static type warning |
| 26 {} | 26 {} |
| 27 | 27 |
| 28 main() { | 28 main() { |
| 29 new A(); | 29 new A(); |
| 30 } | 30 } |
| OLD | NEW |