Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(309)

Issue 1923593002: provide MISSING_RETURN on factory constructors (Closed)

Created:
4 years, 8 months ago by srawlins
Modified:
4 years, 7 months ago
CC:
reviews_dartlang.org
Base URL:
git@github.com:dart-lang/sdk.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

provide MISSING_RETURN on factory constructors BUG=https://github.com/dart-lang/sdk/issues/17121 R=brianwilkerson@google.com, scheglov@google.com Committed: https://github.com/dart-lang/sdk/commit/7cb775f149b488f9aaba48cb811248d53c27e13f

Patch Set 1 #

Total comments: 2

Patch Set 2 : Addressing feedback #

Unified diffs Side-by-side diffs Delta from patch set Stats (+36 lines, -10 lines) Patch
M pkg/analyzer/lib/src/generated/resolver.dart View 1 1 chunk +14 lines, -0 lines 0 comments Download
M pkg/analyzer/test/generated/compile_time_error_code_test.dart View 1 7 chunks +7 lines, -6 lines 0 comments Download
M pkg/analyzer/test/generated/hint_code_test.dart View 1 chunk +11 lines, -0 lines 0 comments Download
M pkg/analyzer/test/generated/non_error_resolver_test.dart View 1 4 chunks +4 lines, -4 lines 0 comments Download

Messages

Total messages: 7 (2 generated)
srawlins
Two notes: * I couldn't use the existing _checkForMissingReturn because it uses a TypeName with ...
4 years, 8 months ago (2016-04-26 18:43:57 UTC) #2
Brian Wilkerson
lgtm
4 years, 8 months ago (2016-04-26 19:10:33 UTC) #3
scheglov
LGTM after rolling back test changes and replacing with "=> null". https://codereview.chromium.org/1923593002/diff/1/pkg/analyzer/test/generated/compile_time_error_code_test.dart File pkg/analyzer/test/generated/compile_time_error_code_test.dart (left): ...
4 years, 7 months ago (2016-04-27 15:52:02 UTC) #4
srawlins
Committed patchset #2 (id:10001) manually as 7cb775f149b488f9aaba48cb811248d53c27e13f (presubmit successful).
4 years, 7 months ago (2016-04-27 19:33:09 UTC) #6
srawlins
4 years, 7 months ago (2016-04-27 19:52:34 UTC) #7
Message was sent while issue was closed.
https://codereview.chromium.org/1923593002/diff/1/pkg/analyzer/test/generated...
File pkg/analyzer/test/generated/compile_time_error_code_test.dart (left):

https://codereview.chromium.org/1923593002/diff/1/pkg/analyzer/test/generated...
pkg/analyzer/test/generated/compile_time_error_code_test.dart:2212: factory
A(this.x) {}
On 2016/04/27 15:52:01, scheglov wrote:
> I think you could replace this with:
> 
> factory A(this.x) => null;
> 
> ...and it would not trigger the new hint.

Great suggestion!

Powered by Google App Engine
This is Rietveld 408576698