improve function type error messages by showing what's incompatible #25170
Labels
closed-duplicate
Closed in favor of an existing report
legacy-area-analyzer
Use area-devexp instead.
P2
A bug or feature request we're likely to work on
type-enhancement
A request for a change that isn't a bug
Function type error messages from strong-mode can be hard to understand. It took me a while to decipher this:
I think the issue is the horizontal scrolling ... the thing that's wrong is pushed way off the right side, in both Atom and IntelliJ it's very hard to see the return type is different.
@vsmenon had an idea: we can instead say something about the return type:
I'd be good to check other tools (for Dart but also other languages) to get some ideas on what works best here.
Of course, they won't always be that easy, but a few special cases can probably handle a lot of the common errors.
The text was updated successfully, but these errors were encountered: