OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // BSD-style license that can be found in the LICENSE file. | |
4 | |
5 import "package:expect/expect.dart"; | |
6 | |
7 class I<T> { } | |
8 | |
9 class J<T> { } | |
10 | |
11 class S<U extends Set<V>, V> { } | |
12 | |
13 class M<U, V, T extends Map<U, V>> { | |
14 t() { return T; } | |
15 } | |
16 | |
17 class A<U, V extends List> = Object with M<U, V, Map<U, V>> implements I<V>; | |
18 | |
19 class C<T, K> = S<Set<T>, T> with A<T, List<K>> implements J<K>; | |
20 | |
21 main() { | |
22 var c = new C<int, bool>(); | |
23 Expect.equals("Map<int, List<bool>>", c.t().toString()); | |
24 Expect.isTrue(c is I<List<bool>>); | |
25 Expect.isTrue(c is J<bool>); | |
26 Expect.isTrue(c is S<int>); | |
gbracha
2014/01/14 01:39:33
Only due to arity issue. Same for last case with M
regis
2014/01/14 18:40:45
Fixed.
| |
27 Expect.isTrue(c is A<int, List<bool>>); | |
28 Expect.isTrue(c is M<Map<int, List<bool>>>); | |
regis
2014/01/14 18:40:45
Fixed here too.
| |
29 } | |
OLD | NEW |