| Index: pkg/compiler/lib/src/diagnostics/generated/shared_messages.dart
|
| diff --git a/pkg/compiler/lib/src/diagnostics/generated/shared_messages.dart b/pkg/compiler/lib/src/diagnostics/generated/shared_messages.dart
|
| index e39c8db85f77f4eb9604c09eb4d0d955bd10921e..7419ab2f379e30a3351bf46af280480c65b18f69 100644
|
| --- a/pkg/compiler/lib/src/diagnostics/generated/shared_messages.dart
|
| +++ b/pkg/compiler/lib/src/diagnostics/generated/shared_messages.dart
|
| @@ -73,4 +73,34 @@ const Map<MessageKind, MessageTemplate> TEMPLATES = const <MessageKind, MessageT
|
| "class A { int A() {} } main() { new A(); }",
|
| ]
|
| ), // Generated. Don't edit.
|
| + MessageKind.RETURN_IN_GENERATIVE_CONSTRUCTOR: const MessageTemplate(
|
| + MessageKind.RETURN_IN_GENERATIVE_CONSTRUCTOR,
|
| + "Constructors can't return values.",
|
| + howToFix: "Try removing the return statement or using a factory constructor.",
|
| + examples: const [
|
| + r"""
|
| + class C {
|
| + C() {
|
| + return 1;
|
| + }
|
| + }
|
| +
|
| + main() => new C();""",
|
| + ]
|
| + ), // Generated. Don't edit.
|
| + MessageKind.RETURN_IN_GENERATOR: const MessageTemplate(
|
| + MessageKind.RETURN_IN_GENERATOR,
|
| + "Can't return a value from a generator function (using the '#{modifier}' modifier).",
|
| + howToFix: "Try removing the value, replacing 'return' with 'yield' or changing the method body modifier",
|
| + examples: const [
|
| + r"""
|
| + foo() async* { return 0; }
|
| + main() => foo();
|
| + """,
|
| + r"""
|
| + foo() sync* { return 0; }
|
| + main() => foo();
|
| + """,
|
| + ]
|
| + ), // Generated. Don't edit.
|
| };
|
|
|