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

HintCode.MISSING_RETURN should include factory constructors as well. #17121

Closed
kevmoo opened this issue Feb 25, 2014 · 8 comments
Closed

HintCode.MISSING_RETURN should include factory constructors as well. #17121

kevmoo opened this issue Feb 25, 2014 · 8 comments
Assignees
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 Feb 25, 2014

Create an empty method with a return type defined, but no return statement: you get a warning.
Create an empty factory ctor with no return statement: nothing.

Seems reasonable.

r32954

@bwilkerson
Copy link
Member

Yes, it does seem reasonable.


Added this to the 1.3 milestone.
Removed Type-Defect, Priority-Unassigned labels.
Added Type-Enhancement, Priority-Medium labels.

@jwren
Copy link
Member

jwren commented Mar 27, 2014

This is for the hint, not warning. Bumping priority to later.

HintCode.MISSING_RETURN should be created on factory constructors as well as on methods and functions.

Source source = addSource(createSource(//
        "class A {",
        " factory A(int x) {",
        " }",
        "}"));


cc @bwilkerson.
Set owner to @jwren.
Removed this from the 1.3 milestone.
Added this to the Later milestone.
Changed the title to: "HintCode.MISSING_RETURN should include factory constructors as well.".

@jwren
Copy link
Member

jwren commented Mar 31, 2014

Changed the title to: "[Hint] HintCode.MISSING_RETURN should include factory constructors as well.".

@clayberg
Copy link

clayberg commented Apr 1, 2014

Added Analyzer-Hint label.

@bwilkerson
Copy link
Member

Changed the title to: "HintCode.MISSING_RETURN should include factory constructors as well.".

@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
@jwren jwren removed their assignment Oct 6, 2015
@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 srawlins self-assigned this Apr 26, 2016
srawlins added a commit that referenced this issue Apr 27, 2016
BUG=#17121
R=brianwilkerson@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org/1923593002 .
@srawlins
Copy link
Member

Done in 7cb775f.

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

6 participants