| Index: pkg/dart_messages/lib/shared_messages.dart
|
| diff --git a/pkg/dart_messages/lib/shared_messages.dart b/pkg/dart_messages/lib/shared_messages.dart
|
| index 5aa2cededb7a5963715c22b46f97fa240d8fe3e8..89a69bc217cc499042780f156105e35c1f8a45a1 100644
|
| --- a/pkg/dart_messages/lib/shared_messages.dart
|
| +++ b/pkg/dart_messages/lib/shared_messages.dart
|
| @@ -191,37 +191,15 @@ final Map<String, Message> MESSAGES = {
|
| }
|
| ]),
|
|
|
| - // Const constructors (factory or not) may not have a body.
|
| - 'CONST_CONSTRUCTOR_OR_FACTORY_WITH_BODY': new Message(
|
| - id: 'LGJGHW',
|
| - subId: 0,
|
| - categories: [Category.parserError],
|
| - template: "Const constructor or factory can't have a body.",
|
| - howToFix: "Remove the 'const' keyword or the body.",
|
| - usedBy: [dart2js],
|
| - examples: const [
|
| - r"""
|
| - class C {
|
| - const C() {}
|
| - }
|
| -
|
| - main() => new C();""",
|
| - r"""
|
| - class C {
|
| - const factory C() {}
|
| - }
|
| -
|
| - main() => new C();"""
|
| - ]),
|
| // Const constructors may not have a body.
|
| 'CONST_CONSTRUCTOR_WITH_BODY': new Message(
|
| id: 'LGJGHW',
|
| - subId: 1,
|
| + subId: 0,
|
| specializationOf: "CONST_CONSTRUCTOR_OR_FACTORY_WITH_BODY",
|
| categories: [Category.parserError],
|
| template: "Const constructor can't have a body.",
|
| howToFix: "Try removing the 'const' keyword or the body.",
|
| - usedBy: [analyzer],
|
| + usedBy: [analyzer, dart2js],
|
| examples: const [
|
| r"""
|
| class C {
|
| @@ -233,14 +211,14 @@ final Map<String, Message> MESSAGES = {
|
| // Const constructor factories may only redirect (and must not have a body).
|
| 'CONST_FACTORY': new Message(
|
| id: 'LGJGHW',
|
| - subId: 2,
|
| + subId: 1,
|
| specializationOf: "CONST_CONSTRUCTOR_OR_FACTORY_WITH_BODY",
|
| categories: [Category.parserError],
|
| template: "Only redirecting factory constructors can be declared to "
|
| "be 'const'.",
|
| howToFix: "Try removing the 'const' keyword or replacing the body with "
|
| "'=' followed by a valid target.",
|
| - usedBy: [analyzer],
|
| + usedBy: [analyzer, dart2js],
|
| examples: const [
|
| r"""
|
| class C {
|
|
|