Compiler: Loses type information in lambda with generic return type #46956
Labels
area-front-end
Use area-front-end for front end / CFE / kernel format related issues.
P2
A bug or feature request we're likely to work on
Dart SDK version: 2.13.3 (stable) (Wed Jun 9 12:44:44 2021 +0200) on "macos_x64"
We noticed this issue when migrating a part of our codebase to null safety. To reproduce, simply add this code to a working Flutter program:
When
flutter test
is run or just running tests through the IDE, you will get this compilation error, even though the analyzer (as seen through VSCode in this case) does not complain:This can be fixed by changing
to
(by explicitly adding the type information to
push()
).The text was updated successfully, but these errors were encountered: