| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 // Regression test for generic mixin fields in checked mode. | 5 // Regression test for generic mixin fields in checked mode. |
| 6 | 6 |
| 7 class A<T> { | 7 class A<T> { |
| 8 T field; | 8 T field; |
| 9 } | 9 } |
| 10 | 10 |
| 11 class B<T> = Object with A<T>; | 11 class B<T> = Object with A<T>; |
| 12 | 12 |
| 13 class C<T> extends B<T> {} /// 03: ok | 13 class C<T> extends B<T> {} //# 03: ok |
| 14 class D extends B<int> {} /// 04: ok | 14 class D extends B<int> {} //# 04: ok |
| 15 | 15 |
| 16 class E = Object with A<int>; | 16 class E = Object with A<int>; |
| 17 | 17 |
| 18 class F extends E {} /// 06: ok | 18 class F extends E {} //# 06: ok |
| 19 | 19 |
| 20 class G<T> extends Object with A<T> {} /// 07: ok | 20 class G<T> extends Object with A<T> {} //# 07: ok |
| 21 class H extends Object with A<int> {} /// 08: ok | 21 class H extends Object with A<int> {} //# 08: ok |
| 22 | 22 |
| 23 void main() { | 23 void main() { |
| 24 new A<num>(); /// 01: ok | 24 new A<num>(); //# 01: ok |
| 25 new B<num>(); /// 02: ok | 25 new B<num>(); //# 02: ok |
| 26 new C<num>(); /// 03: continued | 26 new C<num>(); //# 03: continued |
| 27 new D(); /// 04: continued | 27 new D(); //# 04: continued |
| 28 new E(); /// 05: ok | 28 new E(); //# 05: ok |
| 29 new F(); /// 06: continued | 29 new F(); //# 06: continued |
| 30 new G<num>(); /// 07: continued | 30 new G<num>(); //# 07: continued |
| 31 new H(); /// 08: continued | 31 new H(); //# 08: continued |
| 32 } | 32 } |
| OLD | NEW |