Least and greatest closures are incorrect for covariant generic typedef check<X> = X Function() #44162
Labels
legacy-area-front-end
Legacy: Use area-dart-model instead.
P2
A bug or feature request we're likely to work on
type-bug
Incorrect behavior (everything from a crash to more subtle misbehavior)
Dart SDK version: 2.12.0-29.0.dev (dev) (Mon Nov 9 06:42:00 2020 -0800) on "windows_x64"
Here is a source code example:
Seems like
Object?
should be substituted as a bound both forcheck
andcapturedTypeArgument
here, however this is not so and sample output is:Please note that for another covariant case -
typedef check<X> = X Function()
- greatest closure isObject?
in both cases.See also similar issue against contravariant case: #44161.
The text was updated successfully, but these errors were encountered: