Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Annotation: @alwaysThrows #17999

Closed
kevmoo opened this issue Apr 3, 2014 · 8 comments
Closed

Annotation: @alwaysThrows #17999

kevmoo opened this issue Apr 3, 2014 · 8 comments
Labels
analyzer-warning Issues with the analyzer's Warning codes area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. P2 A bug or feature request we're likely to work on type-enhancement A request for a change that isn't a bug

Comments

@kevmoo
Copy link
Member

kevmoo commented Apr 3, 2014

It's often nice to have a _fail() method or similar.

Often if it's used in a method with a return type, the analyzer will warn about a missing return type.

Solution:

@alwaysThrows (or similar) on a method definition

  1. Analyzer confirms that all code paths through the method throw (as opposed to no-op or return)
  2. Effectively replaces an inline throw in code, eliminating the "does not end in a return statement" hint
@bwilkerson
Copy link
Member

Added this to the 1.4 milestone.
Removed Priority-Unassigned label.
Added Priority-Medium, Area-Analyzer labels.

@bwilkerson
Copy link
Member

Removed this from the 1.4 milestone.
Added this to the Later milestone.

@kasperl
Copy link

kasperl commented Jul 10, 2014

Removed this from the Later milestone.
Added Oldschool-Milestone-Later label.

@kasperl
Copy link

kasperl commented Aug 4, 2014

Removed Oldschool-Milestone-Later label.

@kevmoo kevmoo added Type-Enhancement area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. analyzer-warning Issues with the analyzer's Warning codes labels Aug 4, 2014
@kevmoo kevmoo added P2 A bug or feature request we're likely to work on type-enhancement A request for a change that isn't a bug and removed triaged labels Mar 1, 2016
@srawlins
Copy link
Member

This is filed under analyzer, but the implementation would also involve package:meta, right?

@bwilkerson
Copy link
Member

Yes, but the authors are the same, so...

@srawlins
Copy link
Member

Fair enough. Just understanding the implementation. I guess there's no "area-meta" label.

@srawlins
Copy link
Member

Committed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
analyzer-warning Issues with the analyzer's Warning codes area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. P2 A bug or feature request we're likely to work on type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

4 participants