Dartanalyzer does not allow declare class A with "X extends FutureOr<A<X>>" type parameter . #34264
Labels
analyzer-spec
Issues with the analyzer's implementation of the language spec
area-analyzer
Use area-analyzer for Dart analyzer issues, including the analysis server and code completion.
type-bug
Incorrect behavior (everything from a crash to more subtle misbehavior)
Milestone
Dart SDK Version: 2.1.0-dev.2.0
OS: Windows 10 (64 bit)
The following code sample declares two classes with
Future
andFutureOr
type parameters:Dart passes with both code lines, i.e. just print
OK
as a result.Dartanalyzer passes with class
B<X extends Future<A<X>>> {}
and fails withclass A<X extends FutureOr<A<X>>> {}
, sample output is:I believe this is incorrect result and analyzer should pass both for
Future
andFutureOr
parameters.The text was updated successfully, but these errors were encountered: