Unify two error codes for documentation purposes
Change-Id: I15919ebfa4f8c79ac9ab846eba708aceb58033ed
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/233683
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
diff --git a/pkg/analyzer/lib/src/error/codes.g.dart b/pkg/analyzer/lib/src/error/codes.g.dart
index 2683b24..44012e2 100644
--- a/pkg/analyzer/lib/src/error/codes.g.dart
+++ b/pkg/analyzer/lib/src/error/codes.g.dart
@@ -5753,10 +5753,11 @@
static const CompileTimeErrorCode ILLEGAL_ENUM_VALUES_DECLARATION =
CompileTimeErrorCode(
- 'ILLEGAL_ENUM_VALUES_DECLARATION',
+ 'ILLEGAL_ENUM_VALUES',
"An instance member named 'values' can't be declared in a class that "
"implements 'Enum'.",
correctionMessage: "Try using a different name.",
+ uniqueName: 'ILLEGAL_ENUM_VALUES_DECLARATION',
);
/**
@@ -5765,10 +5766,11 @@
*/
static const CompileTimeErrorCode ILLEGAL_ENUM_VALUES_INHERITANCE =
CompileTimeErrorCode(
- 'ILLEGAL_ENUM_VALUES_INHERITANCE',
+ 'ILLEGAL_ENUM_VALUES',
"An instance member named 'values' can't be inherited from '{0}' in a "
"class that implements 'Enum'.",
correctionMessage: "Try using a different name.",
+ uniqueName: 'ILLEGAL_ENUM_VALUES_INHERITANCE',
);
static const CompileTimeErrorCode ILLEGAL_LANGUAGE_VERSION_OVERRIDE =
diff --git a/pkg/analyzer/messages.yaml b/pkg/analyzer/messages.yaml
index a06b9d4..deb3caf 100644
--- a/pkg/analyzer/messages.yaml
+++ b/pkg/analyzer/messages.yaml
@@ -5025,9 +5025,11 @@
int f() => 0;
```
ILLEGAL_ENUM_VALUES_DECLARATION:
+ sharedName: ILLEGAL_ENUM_VALUES
problemMessage: An instance member named 'values' can't be declared in a class that implements 'Enum'.
correctionMessage: Try using a different name.
ILLEGAL_ENUM_VALUES_INHERITANCE:
+ sharedName: ILLEGAL_ENUM_VALUES
problemMessage: An instance member named 'values' can't be inherited from '{0}' in a class that implements 'Enum'.
correctionMessage: Try using a different name.
comment: |-