dart-sdk/docs
Lasse R.H. Nielsen 16d806b0aa 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

Review URL: https://codereview.chromium.org/2392513002 .
2016-10-05 10:24:10 +02:00
..
language Make the spec specific about the return type of sync*/async/async* function. 2016-10-05 10:24:10 +02:00