blob: de9547154e53f3b762f77b0628972d45a65c6fda [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.
* a type [T] on the form qualified (for instance, [C] or [p.D]) which denotes a
* generic class or parameterized type alias [G1] (that is, [T] is a raw type),
* every type argument of [G1] has a simple bound.
* @description Checks that simple bounds are correct for [typedef] with [X
* extends num] parameter (covariant)
* @author iarkh@unipro.ru
*/
typedef G<X extends num> = void Function<Y extends X>();
main() {
G source;
void Function<X extends num>() target = source;
void Function<X extends dynamic>() target1 = source; //# 01: compile-time error
void Function<Null>() target2 = source; //# 02: compile-time error
}