Inferenced return type of generator function become nullable, if it contains return;
#59669
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.
P3
A lower priority bug or feature request
type-bug
Incorrect behavior (everything from a crash to more subtle misbehavior)
Dart SDK version: 3.5.4
If a generator function contains
return
, inferenced return type becomesIterable<T?>
/Stream<T?>
, while it should beIterable<T>
/Stream<T>
.example code:
The text was updated successfully, but these errors were encountered: