mirror of
https://github.com/dart-lang/sdk
synced 2024-09-16 01:30:32 +00:00
Unify two diagnostic codes for documentation purposes
Change-Id: I1b37dc4584757da4833f111c2ea4c3d9511513db Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/198901 Reviewed-by: Konstantin Shcheglov <scheglov@google.com> Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
This commit is contained in:
parent
90127334ea
commit
62feca7095
|
@ -1581,14 +1581,15 @@ class CompileTimeErrorCode extends AnalyzerErrorCode {
|
|||
* basename `n`.
|
||||
*
|
||||
* Parameters:
|
||||
* 0: the name of the constructor
|
||||
* 0: the name of the field
|
||||
*/
|
||||
static const CompileTimeErrorCode CONFLICTING_CONSTRUCTOR_AND_STATIC_FIELD =
|
||||
CompileTimeErrorCode(
|
||||
'CONFLICTING_CONSTRUCTOR_AND_STATIC_FIELD',
|
||||
'CONFLICTING_CONSTRUCTOR_AND_STATIC_MEMBER',
|
||||
"'{0}' can't be used to name both a constructor and a static field "
|
||||
"in this class.",
|
||||
correction: "Try renaming either the constructor or the field.");
|
||||
correction: "Try renaming either the constructor or the field.",
|
||||
uniqueName: 'CONFLICTING_CONSTRUCTOR_AND_STATIC_FIELD');
|
||||
|
||||
/**
|
||||
* 10.11 Class Member Conflicts: Let `C` be a class. It is a compile-time
|
||||
|
@ -1600,10 +1601,11 @@ class CompileTimeErrorCode extends AnalyzerErrorCode {
|
|||
*/
|
||||
static const CompileTimeErrorCode CONFLICTING_CONSTRUCTOR_AND_STATIC_METHOD =
|
||||
CompileTimeErrorCode(
|
||||
'CONFLICTING_CONSTRUCTOR_AND_STATIC_METHOD',
|
||||
'CONFLICTING_CONSTRUCTOR_AND_STATIC_MEMBER',
|
||||
"'{0}' can't be used to name both a constructor and a static method "
|
||||
"in this class.",
|
||||
correction: "Try renaming either the constructor or the method.");
|
||||
correction: "Try renaming either the constructor or the method.",
|
||||
uniqueName: 'CONFLICTING_CONSTRUCTOR_AND_STATIC_METHOD');
|
||||
|
||||
/**
|
||||
* 10.11 Class Member Conflicts: Let `C` be a class. It is a compile-time
|
||||
|
|
|
@ -11,7 +11,7 @@ class C {
|
|||
//^
|
||||
// [cfe] Conflicts with member 'n'.
|
||||
// ^
|
||||
// [analyzer] COMPILE_TIME_ERROR.CONFLICTING_CONSTRUCTOR_AND_STATIC_FIELD
|
||||
// [analyzer] COMPILE_TIME_ERROR.CONFLICTING_CONSTRUCTOR_AND_STATIC_MEMBER
|
||||
|
||||
static int get n {
|
||||
// ^
|
||||
|
|
|
@ -11,7 +11,7 @@ class C {
|
|||
//^
|
||||
// [cfe] Conflicts with member 'n'.
|
||||
// ^
|
||||
// [analyzer] COMPILE_TIME_ERROR.CONFLICTING_CONSTRUCTOR_AND_STATIC_METHOD
|
||||
// [analyzer] COMPILE_TIME_ERROR.CONFLICTING_CONSTRUCTOR_AND_STATIC_MEMBER
|
||||
|
||||
static int n() {
|
||||
// ^
|
||||
|
|
|
@ -11,7 +11,7 @@ class C {
|
|||
//^
|
||||
// [cfe] Conflicts with setter 'n'.
|
||||
// ^
|
||||
// [analyzer] COMPILE_TIME_ERROR.CONFLICTING_CONSTRUCTOR_AND_STATIC_FIELD
|
||||
// [analyzer] COMPILE_TIME_ERROR.CONFLICTING_CONSTRUCTOR_AND_STATIC_MEMBER
|
||||
|
||||
static set n(int x) {}
|
||||
// ^
|
||||
|
|
|
@ -13,7 +13,7 @@ class C {
|
|||
//^
|
||||
// [cfe] Conflicts with member 'n'.
|
||||
// ^
|
||||
// [analyzer] COMPILE_TIME_ERROR.CONFLICTING_CONSTRUCTOR_AND_STATIC_FIELD
|
||||
// [analyzer] COMPILE_TIME_ERROR.CONFLICTING_CONSTRUCTOR_AND_STATIC_MEMBER
|
||||
|
||||
static int get n {
|
||||
// ^
|
||||
|
|
|
@ -13,7 +13,7 @@ class C {
|
|||
//^
|
||||
// [cfe] Conflicts with member 'n'.
|
||||
// ^
|
||||
// [analyzer] COMPILE_TIME_ERROR.CONFLICTING_CONSTRUCTOR_AND_STATIC_METHOD
|
||||
// [analyzer] COMPILE_TIME_ERROR.CONFLICTING_CONSTRUCTOR_AND_STATIC_MEMBER
|
||||
|
||||
static int n() {
|
||||
// ^
|
||||
|
|
|
@ -13,7 +13,7 @@ class C {
|
|||
//^
|
||||
// [cfe] Conflicts with setter 'n'.
|
||||
// ^
|
||||
// [analyzer] COMPILE_TIME_ERROR.CONFLICTING_CONSTRUCTOR_AND_STATIC_FIELD
|
||||
// [analyzer] COMPILE_TIME_ERROR.CONFLICTING_CONSTRUCTOR_AND_STATIC_MEMBER
|
||||
|
||||
static set n(int x) {}
|
||||
// ^
|
||||
|
|
Loading…
Reference in a new issue