dart-lang / linter

Linter for Dart.
https://dart.dev/tools/linter-rules
BSD 3-Clause "New" or "Revised" License
631 stars 170 forks source link

unnecessary_lambda doesn't lint #1090

Open zoechi opened 6 years ago

zoechi commented 6 years ago
            onChanged: (text) =>
                groupController.messageComposeController.textChanged(text),

but I think it should ;-)

matanlurey commented 6 years ago

This is likely not a safe assumption in Dart2. There are many cases creating these forwarding closures allows the types to be propagated in ways that they are not when a tear off occurs.