Index: pkg/analyzer/lib/src/generated/error_verifier.dart |
diff --git a/pkg/analyzer/lib/src/generated/error_verifier.dart b/pkg/analyzer/lib/src/generated/error_verifier.dart |
index 5de25974e5dc13a9126662466c557fc02883ad8b..008e046a8e69585e92badd47cd65cfa95b1e4e7a 100644 |
--- a/pkg/analyzer/lib/src/generated/error_verifier.dart |
+++ b/pkg/analyzer/lib/src/generated/error_verifier.dart |
@@ -1928,7 +1928,9 @@ class ErrorVerifier extends RecursiveAstVisitor<Object> { |
} else if (_inGenerator) { |
// RETURN_IN_GENERATOR |
_errorReporter.reportErrorForNode( |
- CompileTimeErrorCode.RETURN_IN_GENERATOR, statement); |
+ CompileTimeErrorCode.RETURN_IN_GENERATOR, |
+ statement, |
+ [_inAsync ? "async*" : "sync*"]); |
} |
// RETURN_OF_INVALID_TYPE |
return _checkForReturnOfInvalidType(returnExpression, expectedReturnType); |