blob: 97c6af2e7e43477a45dcb77eb2a6412be4763529 [file] [log] [blame] [edit]
// Copyright (c) 2024, 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.
// Tests multiple wildcard generic type parameters.
// SharedOptions=--enable-experiment=wildcard-variables
// Class type parameters
class T<_, _> {}
typedef ForgetfulMap<_, _> = Map<Object?, Object?>;
typedef F<_, X, _> = X Function<_ extends X>(X _, X _);
// Function type parameters
void genericFunction<_, _>() {}
void genericFunction2<_ extends Iterable<int>, _ extends num>() {}
void genericFunction3<_ extends void Function<_>(int, int), _>() {}
void main() {
void genericCallback(bool Function<T, E>() func) {}
genericCallback(<_, _>() => true);
}