| Index: pkg/compiler/lib/src/warnings.dart
|
| diff --git a/pkg/compiler/lib/src/warnings.dart b/pkg/compiler/lib/src/warnings.dart
|
| index 6a78b8adff1a26d5283a59e0f4e2252c52ed21cf..e00c01d41d6e0cd14587b85569b9c6b27a764884 100644
|
| --- a/pkg/compiler/lib/src/warnings.dart
|
| +++ b/pkg/compiler/lib/src/warnings.dart
|
| @@ -2132,7 +2132,7 @@ main() => new A();""",
|
| """
|
| class A {
|
| A();
|
| - factory A.a() async* => new A();
|
| + factory A.a() async* {}
|
| }
|
| main() => new A.a();"""]);
|
|
|
| @@ -2176,6 +2176,23 @@ main() sync* {
|
| var yield;
|
| }"""]);
|
|
|
| + static const MessageKind RETURN_IN_GENERATOR =
|
| + const MessageKind(
|
| + "'return' with a value is not allowed in a method body using the "
|
| + "'#{modifier}' modifier.",
|
| + howToFix: "Try removing the value, replacing 'return' with 'yield' "
|
| + "or changing the method body modifier.",
|
| + examples: const [
|
| +"""
|
| +foo() async* { return 0; }
|
| +main() => foo();
|
| +""",
|
| +
|
| +"""
|
| +foo() sync* { return 0; }
|
| +main() => foo();
|
| +"""]);
|
| +
|
| static const MessageKind NATIVE_NOT_SUPPORTED = const MessageKind(
|
| "'native' modifier is not supported.",
|
| howToFix: "Try removing the 'native' implementation or analyzing the "
|
|
|