| Index: pkg/analyzer/lib/src/dart/error/syntactic_errors.dart
|
| diff --git a/pkg/analyzer/lib/src/dart/error/syntactic_errors.dart b/pkg/analyzer/lib/src/dart/error/syntactic_errors.dart
|
| index 18fef4cb1080f9546e80018da3cea0a2f7ff98ca..798e30dac4623aef3b37155769a7e8d5ad444c35 100644
|
| --- a/pkg/analyzer/lib/src/dart/error/syntactic_errors.dart
|
| +++ b/pkg/analyzer/lib/src/dart/error/syntactic_errors.dart
|
| @@ -82,6 +82,11 @@ class ParserErrorCode extends ErrorCode {
|
| "For-in loops use 'in' rather than a colon.",
|
| "Try replacing the colon with the keyword 'in'.");
|
|
|
| + static const ParserErrorCode CONST_AND_COVARIANT = const ParserErrorCode(
|
| + 'CONST_AND_COVARIANT',
|
| + "Members can't be declared to be both 'const' and 'covariant'.",
|
| + "Try removing either the 'const' or 'covariant' keyword.");
|
| +
|
| static const ParserErrorCode CONST_AND_FINAL = const ParserErrorCode(
|
| 'CONST_AND_FINAL',
|
| "Members can't be declared to be both 'const' and 'final'.",
|
| @@ -142,6 +147,27 @@ class ParserErrorCode extends ErrorCode {
|
| "A continue statement in a switch statement must have a label as a target.",
|
| "Try adding a label associated with one of the case clauses to the continue statement.");
|
|
|
| + static const ParserErrorCode COVARIANT_AFTER_VAR = const ParserErrorCode(
|
| + 'COVARIANT_AFTER_VAR',
|
| + "The modifier 'covariant' should be before the modifier 'var'.",
|
| + "Try re-ordering the modifiers.");
|
| +
|
| + static const ParserErrorCode COVARIANT_AND_STATIC = const ParserErrorCode(
|
| + 'COVARIANT_AND_STATIC',
|
| + "Members can't be declared to be both 'covariant' and 'static'.",
|
| + "Try removing either the 'covariant' or 'static' keyword.");
|
| +
|
| + static const ParserErrorCode COVARIANT_TOP_LEVEL_DECLARATION =
|
| + const ParserErrorCode(
|
| + 'COVARIANT_TOP_LEVEL_DECLARATION',
|
| + "Top-level declarations can't be declared to be covariant.",
|
| + "Try removing the keyword 'covariant'.");
|
| +
|
| + static const ParserErrorCode COVARIANT_CONSTRUCTOR = const ParserErrorCode(
|
| + 'COVARIANT_CONSTRUCTOR',
|
| + "A constructor can't be declared to be 'covariant'.",
|
| + "Try removing the keyword 'covariant'.");
|
| +
|
| static const ParserErrorCode DEFAULT_VALUE_IN_FUNCTION_TYPE =
|
| const ParserErrorCode(
|
| 'DEFAULT_VALUE_IN_FUNCTION_TYPE',
|
| @@ -322,6 +348,11 @@ class ParserErrorCode extends ErrorCode {
|
| "Field formal parameters can only be used in a constructor.",
|
| "Try replacing the field formal parameter with a normal parameter.");
|
|
|
| + static const ParserErrorCode FINAL_AND_COVARIANT = const ParserErrorCode(
|
| + 'FINAL_AND_COVARIANT',
|
| + "Members can't be declared to be both 'final' and 'covariant'.",
|
| + "Try removing either the 'final' or 'covariant' keyword.");
|
| +
|
| static const ParserErrorCode FINAL_AND_VAR = const ParserErrorCode(
|
| 'FINAL_AND_VAR',
|
| "Members can't be declared to be both 'final' and 'var'.",
|
|
|