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

Issue 2392513002: Make the spec specific about the return type of sync*/async/async* function. (Closed)

Created:
4 years, 2 months ago by Lasse Reichstein Nielsen
Modified:
4 years, 2 months ago
Reviewers:
floitsch, eernst
CC:
reviews_dartlang.org
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Make the spec specific about the return type of sync*/async/async* function. Now requires the type to be a supertype of `Iterable<T>`/`Future<T>`/`Stream<T>` for some `T`. This allows, say, all `Future<T>` return types for `async` but disallows using a different class implementing `Future`: ``` MyFuture foo() async {} ``` gives a static warning (error in Dart 2) because the return type is statically known to be unsatisfied. Fixes issue #27470 BUG= http://dartbugcom/27470 R=eernst@google.com, floitsch@google.com Committed: https://github.com/dart-lang/sdk/commit/16d806b0aa4b1100e1dffe6940e80014070b1bba

Patch Set 1 #

Total comments: 2

Patch Set 2 : Address comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+3 lines, -1 line) Patch
M docs/language/dartLangSpec.tex View 1 1 chunk +3 lines, -1 line 0 comments Download

Messages

Total messages: 8 (2 generated)
Lasse Reichstein Nielsen
WDYT?
4 years, 2 months ago (2016-10-03 12:00:11 UTC) #2
Lasse Reichstein Nielsen
WDYT?
4 years, 2 months ago (2016-10-03 12:00:28 UTC) #3
eernst
LGTM https://codereview.chromium.org/2392513002/diff/1/docs/language/dartLangSpec.tex File docs/language/dartLangSpec.tex (right): https://codereview.chromium.org/2392513002/diff/1/docs/language/dartLangSpec.tex#newcode597 docs/language/dartLangSpec.tex:597: It is a static warning if the declared ...
4 years, 2 months ago (2016-10-03 12:49:08 UTC) #4
floitsch
LGTM.
4 years, 2 months ago (2016-10-03 14:11:00 UTC) #5
Lasse Reichstein Nielsen
https://codereview.chromium.org/2392513002/diff/1/docs/language/dartLangSpec.tex File docs/language/dartLangSpec.tex (right): https://codereview.chromium.org/2392513002/diff/1/docs/language/dartLangSpec.tex#newcode597 docs/language/dartLangSpec.tex:597: It is a static warning if the declared return ...
4 years, 2 months ago (2016-10-05 08:22:57 UTC) #6
Lasse Reichstein Nielsen
4 years, 2 months ago (2016-10-05 08:25:48 UTC) #8
Message was sent while issue was closed.
Committed patchset #2 (id:20001) manually as
16d806b0aa4b1100e1dffe6940e80014070b1bba (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698