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 | 4 |
5 class B extends Object with M1, M2 { | 5 class B extends Object with M1, M2 { |
6 B(value); | 6 B(value); |
7 } | 7 } |
8 | 8 |
9 abstract class M1 { | 9 abstract class M1 { |
10 m() => print("M1"); | 10 m() => print("M1"); |
11 } | 11 } |
12 | 12 |
13 abstract class M2 { | 13 abstract class M2 { |
14 m() => print("M2"); | 14 m() => print("M2"); |
15 } | 15 } |
16 | 16 |
17 class C extends Object with M1, M2 { | 17 class C extends Object with M1, M2 { |
18 C(value); | 18 C(value); |
19 } | 19 } |
20 | 20 |
21 abstract class G1<T> { | 21 abstract class G1<T> { |
22 m() => print(T); | 22 m() => print(T); |
23 } | 23 } |
24 | 24 |
25 class D<S> extends Object with G1<S> { | 25 class D<S> extends Object with G1<S> {} |
26 } | |
27 | 26 |
28 main() { | 27 main() { |
29 new B(null).m(); | 28 new B(null).m(); |
30 new C(null).m(); | 29 new C(null).m(); |
31 new D().m(); | 30 new D().m(); |
32 new D<int>().m(); | 31 new D<int>().m(); |
33 new D<List<int>>().m(); | 32 new D<List<int>>().m(); |
34 } | 33 } |
OLD | NEW |