DescriptionMake 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 #Messages
Total messages: 8 (2 generated)
|