Analyzer flattening futures incorrectly #38368
Labels
area-dart-model
For issues related to conformance to the language spec in the parser, compilers or the CLI analyzer.
dart-model-analyzer-spec
Issues with the analyzer's implementation of the language spec
P3
A lower priority bug or feature request
type-bug
Incorrect behavior (everything from a crash to more subtle misbehavior)
This code compiles with CFE, but analyzer complains that:
Divergent<int>
, which isn't aFuture<Divergent<Divergent<Divergent<int>>>>
andFuture<Divergent<Divergent<Divergent<int>>>>
can't be assigned to a variable of typeFuture<Divergent<Divergent<int>>>
.flatten(
Divergent<T>
) =Divergent<Divergent<T>>
, so the return type of the closure should beFuture<Divergent<Divergent<int>>>
.Also see #25611, #31887, #32881.
The text was updated successfully, but these errors were encountered: