blob: 6bd858983376b25e1dc5eb520d2c476ddcf61f04 [file] [log] [blame]
// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// @dart = 2.9
/// @assertion Any use of a type [T] which is not well-bounded is a
/// compile-time error.
/// @description Checks that compile error is thrown when function alias with
/// type parameters which are not bounded well.
/// @Issue 46483
/// @author iarkh@unipro.ru
class A<T extends A<T>> {}
typedef B<X extends A<X>> = X Function(X);
main() {
B<A> b2;
B<void> b4;
B<Null> b5;
B<A<dynamic>> b6;
B<A<void>> b8;
B<A<Null>> b9;
}