diff --git a/pkg/analyzer/lib/src/error/codes.g.dart b/pkg/analyzer/lib/src/error/codes.g.dart index 69e838548df..b6c285a96e4 100644 --- a/pkg/analyzer/lib/src/error/codes.g.dart +++ b/pkg/analyzer/lib/src/error/codes.g.dart @@ -4521,27 +4521,30 @@ class CompileTimeErrorCode extends AnalyzerErrorCode { static const CompileTimeErrorCode EXTERNAL_FIELD_CONSTRUCTOR_INITIALIZER = CompileTimeErrorCode( - 'EXTERNAL_FIELD_CONSTRUCTOR_INITIALIZER', - "External fields cannot have initializers.", + 'EXTERNAL_WITH_INITIALIZER', + "External fields can't have initializers.", correctionMessage: "Try removing the field initializer or the 'external' keyword from the " "field declaration.", + uniqueName: 'EXTERNAL_FIELD_CONSTRUCTOR_INITIALIZER', ); static const CompileTimeErrorCode EXTERNAL_FIELD_INITIALIZER = CompileTimeErrorCode( - 'EXTERNAL_FIELD_INITIALIZER', - "External fields cannot have initializers.", + 'EXTERNAL_WITH_INITIALIZER', + "External fields can't have initializers.", correctionMessage: "Try removing the initializer or the 'external' keyword.", + uniqueName: 'EXTERNAL_FIELD_INITIALIZER', ); static const CompileTimeErrorCode EXTERNAL_VARIABLE_INITIALIZER = CompileTimeErrorCode( - 'EXTERNAL_VARIABLE_INITIALIZER', - "External variables cannot have initializers.", + 'EXTERNAL_WITH_INITIALIZER', + "External variables can't have initializers.", correctionMessage: "Try removing the initializer or the 'external' keyword.", + uniqueName: 'EXTERNAL_VARIABLE_INITIALIZER', ); /** diff --git a/pkg/analyzer/messages.yaml b/pkg/analyzer/messages.yaml index 0200008fb24..7235ace20ef 100644 --- a/pkg/analyzer/messages.yaml +++ b/pkg/analyzer/messages.yaml @@ -3971,13 +3971,16 @@ CompileTimeErrorCode: If there are multiple cascaded accesses, you'll need to duplicate the extension override for each one. EXTERNAL_FIELD_CONSTRUCTOR_INITIALIZER: - problemMessage: External fields cannot have initializers. + sharedName: EXTERNAL_WITH_INITIALIZER + problemMessage: External fields can't have initializers. correctionMessage: "Try removing the field initializer or the 'external' keyword from the field declaration." EXTERNAL_FIELD_INITIALIZER: - problemMessage: External fields cannot have initializers. + sharedName: EXTERNAL_WITH_INITIALIZER + problemMessage: External fields can't have initializers. correctionMessage: "Try removing the initializer or the 'external' keyword." EXTERNAL_VARIABLE_INITIALIZER: - problemMessage: External variables cannot have initializers. + sharedName: EXTERNAL_WITH_INITIALIZER + problemMessage: External variables can't have initializers. correctionMessage: "Try removing the initializer or the 'external' keyword." EXTRA_POSITIONAL_ARGUMENTS: problemMessage: "Too many positional arguments: {0} expected, but {1} found."