OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file |
| 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. |
| 4 |
| 5 import 'package:expect/expect.dart' show Expect; |
| 6 |
| 7 class A {} |
| 8 |
| 9 class B {} |
| 10 |
| 11 class C {} |
| 12 |
| 13 class D {} |
| 14 |
| 15 class E {} |
| 16 |
| 17 class F {} |
| 18 |
| 19 class M1<Tm1> { |
| 20 m1() => "M1<$Tm1>"; |
| 21 } |
| 22 |
| 23 class M2<Tm2> { |
| 24 m2() => "M2<$Tm2>"; |
| 25 } |
| 26 |
| 27 class M3<Tm3> { |
| 28 m3() => "M3<$Tm3>"; |
| 29 } |
| 30 |
| 31 class M4<Tm4> { |
| 32 m4() => "M4<$Tm4>"; |
| 33 } |
| 34 |
| 35 class M5<Tm5> { |
| 36 m5() => "M5<$Tm5>"; |
| 37 } |
| 38 |
| 39 class C1 = Object with M1, M2<A>, M3, M4<B>, M5<C>; |
| 40 |
| 41 class C2 = Object with M1<A>, M2<B>, M3<C>, M4<D>, M5<E>; |
| 42 |
| 43 class C3<T> = Object with M1<A>, M2<T>, M3, M4, M5<B>; |
| 44 |
| 45 class C4 extends Object with M1, M2<A>, M3, M4<B>, M5<C> {} |
| 46 |
| 47 class C5 extends Object with M1<A>, M2<B>, M3<C>, M4<D>, M5<E> {} |
| 48 |
| 49 class C6<T> extends Object with M1<A>, M2<T>, M3, M4, M5<B> {} |
| 50 |
| 51 class C7 = Object with M1<A>, M2<A>, M3<A>, M4<A>, M5<A>; |
| 52 |
| 53 class C8 extends Object with M1<A>, M2<A>, M3<A>, M4<A>, M5<A> {} |
| 54 |
| 55 class C9 = Object |
| 56 with M1<List<A>>, M2<List<A>>, M3<List<A>>, M4<List<A>>, M5<List<A>>; |
| 57 |
| 58 class CA extends Object |
| 59 with M1<List<A>>, M2<List<A>>, M3<List<A>>, M4<List<A>>, M5<List<A>> {} |
| 60 |
| 61 trace(x) => "${x.m1()}, ${x.m2()}, ${x.m3()}, ${x.m4()}, ${x.m5()}"; |
| 62 |
| 63 main() { |
| 64 Expect.stringEquals( |
| 65 "M1<dynamic>, M2<A>, M3<dynamic>, M4<B>, M5<C>", trace(new C1())); |
| 66 Expect.stringEquals("M1<A>, M2<B>, M3<C>, M4<D>, M5<E>", trace(new C2())); |
| 67 Expect.stringEquals( |
| 68 "M1<A>, M2<dynamic>, M3<dynamic>, M4<dynamic>, M5<B>", trace(new C3())); |
| 69 Expect.stringEquals( |
| 70 "M1<A>, M2<F>, M3<dynamic>, M4<dynamic>, M5<B>", trace(new C3<F>())); |
| 71 Expect.stringEquals( |
| 72 "M1<dynamic>, M2<A>, M3<dynamic>, M4<B>, M5<C>", trace(new C4())); |
| 73 Expect.stringEquals("M1<A>, M2<B>, M3<C>, M4<D>, M5<E>", trace(new C5())); |
| 74 Expect.stringEquals( |
| 75 "M1<A>, M2<dynamic>, M3<dynamic>, M4<dynamic>, M5<B>", trace(new C6())); |
| 76 Expect.stringEquals( |
| 77 "M1<A>, M2<F>, M3<dynamic>, M4<dynamic>, M5<B>", trace(new C6<F>())); |
| 78 Expect.stringEquals("M1<A>, M2<A>, M3<A>, M4<A>, M5<A>", trace(new C7())); |
| 79 Expect.stringEquals("M1<A>, M2<A>, M3<A>, M4<A>, M5<A>", trace(new C8())); |
| 80 Expect.stringEquals( |
| 81 "M1<List<A>>, M2<List<A>>, M3<List<A>>, M4<List<A>>, M5<List<A>>", |
| 82 trace(new C9())); |
| 83 Expect.stringEquals( |
| 84 "M1<List<A>>, M2<List<A>>, M3<List<A>>, M4<List<A>>, M5<List<A>>", |
| 85 trace(new CA())); |
| 86 } |
OLD | NEW |