You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Show all function exit points by clicking on return or the return type #4844
Is your feature request related to a problem? Please describe.
Eclipse has a nice feature where clicking on either a return statement or the return type of a function, all the exit points of the function are highlighted (whether they are return statements, throw statements, etc.).
Dart doesn't have checked exceptions, so doing this in Dart won't give the user a complete view of all the ways a function can exit (well, to be fair, Java also has unchecked exceptions, so it's not complete for Java either) -- but even being able to easily spot most of the return points in Dart would be really helpful.
There's some discussion about changing how occurrences are computed to fix some issues with .new in #4670 so maybe it makes sense to try and handle these together.
Activity
DanTup commentedon Nov 20, 2023
TypeScript does this too:
There's some discussion about changing how occurrences are computed to fix some issues with
.newin #4670 so maybe it makes sense to try and handle these together.DanTup commentedon Feb 17, 2025
Interestingly, TypeScript excludes
throws that are insidetryif there is acatch:I think to do the same in Dart we'd need to check whether the type being thrown is caught by a
catch(since in Dart they can have types on them).DanTup commentedon Aug 12, 2025
This has recently been implemented via dart-lang/sdk#61170
It'll ship in an upcoming SDK.
lukehutch commentedon Aug 12, 2025
Psyched for this. Thank you!