| Index: pkg/analyzer/lib/src/task/strong/checker.dart
|
| diff --git a/pkg/analyzer/lib/src/task/strong/checker.dart b/pkg/analyzer/lib/src/task/strong/checker.dart
|
| index dab56d1138878615b469613aef1e9a380a26a9d4..d557eb244e0f334d97b125182e4a8d3ad138eadd 100644
|
| --- a/pkg/analyzer/lib/src/task/strong/checker.dart
|
| +++ b/pkg/analyzer/lib/src/task/strong/checker.dart
|
| @@ -613,6 +613,14 @@ class CodeChecker extends RecursiveAstVisitor {
|
| // analyzer error in this case.
|
| return;
|
| }
|
| + InterfaceType futureType = rules.provider.futureType;
|
| + DartType actualType = expression.staticType;
|
| + if (body.isAsynchronous &&
|
| + !body.isGenerator &&
|
| + actualType is InterfaceType &&
|
| + actualType.element == futureType.element) {
|
| + type = futureType.substitute4([type]);
|
| + }
|
| // TODO(vsm): Enforce void or dynamic (to void?) when expression is null.
|
| if (expression != null) checkAssignment(expression, type);
|
| }
|
|
|