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

Issue 2866213004: Allowing `e` of any type in `void f(...) => e` in dart2js. (Closed)

Created:
3 years, 7 months ago by eernst
Modified:
3 years, 7 months ago
CC:
reviews_dartlang.org, floitsch
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Patch Set 1 #

Patch Set 2 : Allowing `e` of any type in `void f(...) => e` in dart2js #

Patch Set 3 : Rebased #

Patch Set 4 : Rebase again #

Unified diffs Side-by-side diffs Delta from patch set Stats (+4 lines, -1 line) Patch
M pkg/compiler/lib/src/typechecker.dart View 1 chunk +4 lines, -1 line 0 comments Download

Messages

Total messages: 8 (3 generated)
eernst
Allowing `e` of any type in `void f(...) => e` in dart2js, as a step ...
3 years, 7 months ago (2017-05-09 14:46:39 UTC) #2
eernst
Test cases are available in https://codereview.chromium.org/2870063002/: tests/language/void_{block,arrow}_return_test.dart. I did not add them to this CL ...
3 years, 7 months ago (2017-05-09 14:57:56 UTC) #3
Siggi Cherem (dart-lang)
lgtm ha, I can't believe we didn't used to have any tests covering this before. ...
3 years, 7 months ago (2017-05-09 17:19:34 UTC) #5
eernst
Committed patchset #4 (id:60001) manually as 9928c5cb805dedf73b83ab051069e7a2e8cb0e06 (presubmit successful).
3 years, 7 months ago (2017-05-11 14:15:31 UTC) #7
eernst
3 years, 7 months ago (2017-05-11 16:42:40 UTC) #8
Message was sent while issue was closed.
I didn't actually copy the new test files into this CL. The reason
for not doing it is really bad: It all worked fine for dart2js also
after I landed the analyzer CL (2870363003), without status file
changes, but that's because test.py does not detect whether dart2js
has a static type warning or not.

So '//# 00: static type warning' is simply misleading for dart2js
in tests/language (but I suppose that's considered well-known by
everybody else than me ;-).

As it happens, compiler/dart2js/type_checker_test.dart started
failing when I landed this, and that's addressed in CL 2875983002.
That's a place where dart2js static warnings are actually tested.
As mentioned in that CL, we may need to make further adjustments
to type_checker_test in order to ensure good coverage of =>
functions, but that will be a new CL.

Powered by Google App Engine
This is Rietveld 408576698