blob: 11762bfa55ef35cc3ade33e5069ed1ce0de7888a [file] [log] [blame]
// Copyright (c) 2018, 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
/// @description Regression test for the issues 35114 (Analyzer does not allow
/// declare a class with typed function parameter if it's parametrized
/// contravariant or invariant) and 35115 (Dart runtime does not allow declare a
/// class with typed function parameter if it's parametrized contravariant or
/// invariant)
/// @Issue 35114, 35115
/// @author iarkh@unipro.ru
typedef G<X> = void Function(X);
class A<X extends G> {}
main() {
G<dynamic> b;
G<Null> a;
G<int> c;
A<G<dynamic>> b1;
A<G<Null>> a1;
A<G<int>> c1;
// ^
// [analyzer] unspecified
// [cfe] unspecified
}