OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2015, 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 // Regression test for issue 21912. |
| 6 |
| 7 class A {} |
| 8 class B extends A {} |
| 9 |
| 10 typedef T Function2<S, T>(S z); |
| 11 typedef B AToB(A x); |
| 12 typedef A BToA(B x); |
| 13 |
| 14 void main() { |
| 15 { |
| 16 Function2<Function2<A, B>, Function2<B, A>> t1; |
| 17 Function2<AToB, BToA> t2; |
| 18 Function2<Function2<int, double>, Function2<int, double>> left; |
| 19 left = t1; /// 01: ok |
| 20 left = t2; /// 02: ok |
| 21 } |
| 22 } |
OLD | NEW |