| OLD | NEW |
| (Empty) | |
| 1 // Copyright (c) 2013, 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"; |
| 6 |
| 7 class M<T> { |
| 8 t() { return T; } |
| 9 } |
| 10 |
| 11 typedef A<U> = Object with M<List<U>>; |
| 12 |
| 13 typedef B0 = Object with A<Set<bool>>; |
| 14 |
| 15 typedef B1 = Object with A<Set<int>>; |
| 16 |
| 17 class C0 extends B0 { } |
| 18 |
| 19 class C1 extends B1 { } |
| 20 |
| 21 typedef A2<K, V> = Object with M<Map<K, V>>; |
| 22 |
| 23 typedef B2<V> = Object with A2<Set<V>, List<V>>; |
| 24 |
| 25 typedef B3<K, V> = Object with A2<Set<K>, List<V>>; |
| 26 |
| 27 class C2<T> extends B2<T> { } |
| 28 |
| 29 class C3<T> extends B3<T, int> { } |
| 30 |
| 31 class N { |
| 32 q() { return 42; } |
| 33 } |
| 34 |
| 35 typedef O<U> = Object with N; |
| 36 |
| 37 typedef P<K, V> = Object with O<V>; |
| 38 |
| 39 class Q<K, V> extends P<K, V> { } |
| 40 |
| 41 main() { |
| 42 Expect.equals("List<Set<bool>>", new C0().t().toString()); |
| 43 Expect.equals("List<Set<int>>", new C1().t().toString()); |
| 44 Expect.equals("Map<Set<bool>, List<bool>>", new C2<bool>().t().toString()); |
| 45 Expect.equals("Map<Set<bool>, List<int>>", new C3<bool>().t().toString()); |
| 46 Expect.equals(42, new Q<bool, int>().q()); |
| 47 } |
| OLD | NEW |