| Index: pkg/compiler/lib/src/diagnostics/dart2js_messages.dart
|
| diff --git a/pkg/compiler/lib/src/diagnostics/dart2js_messages.dart b/pkg/compiler/lib/src/diagnostics/dart2js_messages.dart
|
| index 2dfa32434189d608b63bd6d94e5dbcbe56e000c9..0f4e6247c53531ed8f8431ea22ce6300da54742b 100644
|
| --- a/pkg/compiler/lib/src/diagnostics/dart2js_messages.dart
|
| +++ b/pkg/compiler/lib/src/diagnostics/dart2js_messages.dart
|
| @@ -3185,7 +3185,6 @@ below as well as the source location above).
|
| 'INVALID_SYNC_MODIFIER': {
|
| 'id': 'FNYUYU',
|
| 'template': "Invalid modifier 'sync'.",
|
| - 'options': ['--enable-async'],
|
| 'howToFix': "Try replacing 'sync' with 'sync*'.",
|
| 'examples': ["main() sync {}"],
|
| },
|
| @@ -3193,7 +3192,6 @@ below as well as the source location above).
|
| 'INVALID_AWAIT_FOR': {
|
| 'id': 'IEYGCY',
|
| 'template': "'await' is only supported on for-in loops.",
|
| - 'options': ['--enable-async'],
|
| 'howToFix': "Try rewriting the loop as a for-in loop or removing the "
|
| "'await' keyword.",
|
| 'examples': [
|
| @@ -3205,6 +3203,49 @@ await for (int i = 0; i < 10; i++) {}
|
| ],
|
| },
|
|
|
| + 'INVALID_AWAIT_FOR_IN': {
|
| + 'id': 'FIEYGC',
|
| + 'template': "'await' is only supported in methods with an 'async' or "
|
| + "'async*' body modifier.",
|
| + 'howToFix': "Try adding 'async' or 'async*' to the method body or "
|
| + "removing the 'await' keyword.",
|
| + 'examples': [
|
| + """
|
| +main(o) sync* {
|
| + await for (var e in o) {}
|
| +}
|
| +"""
|
| + ],
|
| + },
|
| +
|
| + 'INVALID_AWAIT': {
|
| + 'id': 'IEYHYD',
|
| + 'template': "'await' is only supported in methods with an 'async' or "
|
| + "'async*' body modifier.",
|
| + 'howToFix': "Try adding 'async' or 'async*' to the method body.",
|
| + 'examples': [
|
| + """
|
| +main() sync* {
|
| + await null;
|
| +}
|
| +"""
|
| + ],
|
| + },
|
| +
|
| + 'INVALID_YIELD': {
|
| + 'id': 'IPGGCY',
|
| + 'template': "'yield' is only supported in methods with a 'sync*' or "
|
| + "'async*' body modifier.",
|
| + 'howToFix': "Try adding 'sync*' or 'async*' to the method body.",
|
| + 'examples': [
|
| + """
|
| +main() async {
|
| + yield 0;
|
| +}
|
| +"""
|
| + ],
|
| + },
|
| +
|
| 'ASYNC_MODIFIER_ON_ABSTRACT_METHOD': {
|
| 'id': 'VRISLY',
|
| 'template':
|
|
|