Unify two diagnostics for documentation purposes

Change-Id: Icd100bafd1222144688f68c1bc3d2a4a7c29d10d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/167001
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
This commit is contained in:
Brian Wilkerson 2020-10-11 15:56:40 +00:00 committed by commit-bot@chromium.org
parent 4322f2a518
commit c2314f1a57

View file

@ -22,16 +22,24 @@ export 'package:analyzer/src/dart/error/todo_codes.dart';
* when appropriate, how the problem can be corrected.
*/
class CompileTimeErrorCode extends AnalyzerErrorCode {
/**
* No parameters.
*/
static const CompileTimeErrorCode ABSTRACT_FIELD_CONSTRUCTOR_INITIALIZER =
CompileTimeErrorCode('ABSTRACT_FIELD_CONSTRUCTOR_INITIALIZER',
'Abstract fields cannot have initializers.',
CompileTimeErrorCodeWithUniqueName(
'ABSTRACT_FIELD_INITIALIZER',
'ABSTRACT_FIELD_CONSTRUCTOR_INITIALIZER',
"Abstract fields can't have initializers.",
correction:
"Try removing the field initializer or the 'abstract' keyword "
"from the field declaration.");
/**
* No parameters.
*/
static const CompileTimeErrorCode ABSTRACT_FIELD_INITIALIZER =
CompileTimeErrorCode('ABSTRACT_FIELD_INITIALIZER',
'Abstract fields cannot have initializers.',
"Abstract fields can't have initializers.",
correction:
"Try removing the initializer or the 'abstract' keyword.");