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 typedef T F<T>(T t); |
| 6 |
| 7 class B<T extends F<T>> {} |
| 8 class C<T extends F<C<T>>> {} |
| 9 |
| 10 class D extends B<D> { |
| 11 D foo(D x) => x; |
| 12 D call(D x) => x; |
| 13 D bar(D x) => x; |
| 14 } |
| 15 |
| 16 class E extends C<E> { |
| 17 C<E> foo(C<E> x) => x; |
| 18 C<E> call(C<E> x) => x; |
| 19 C<E> bar(C<E> x) => x; |
| 20 } |
| 21 |
| 22 main() { |
| 23 F<D> fd = new D(); |
| 24 var d = fd(fd); |
| 25 print(d); |
| 26 F<E> fe = new E(); |
| 27 var e = fe(fe); |
| 28 print(e); |
| 29 } |
OLD | NEW |