The parameter 'x' has type 'y' which does not match the corresponding type 'y' in the overridden method. #47311
Labels
legacy-area-front-end
Legacy: Use area-dart-model instead.
P2
A bug or feature request we're likely to work on
dart --version
)Dart SDK version: 2.15.0-156.0.dev (dev) (Mon Sep 27 23:15:54 2021 -0700) on "macos_x64"
The following code does not report any analysis errors but does not compile:
The error is:
I would expect the program to compile and run.
Additional Context
If we change the return type of
Convert
toT?
, the code compiles:Also, if we specify that
T extends Object
onBase
, the code compiles:The text was updated successfully, but these errors were encountered: