Version 2.14.0-42.0.dev
Merge commit 'aaf35b839a506af18ad4079f87e9c4b097e2ca52' into 'dev'
diff --git a/pkg/analyzer/lib/src/error/codes.dart b/pkg/analyzer/lib/src/error/codes.dart
index 7337eb5..6cd2625 100644
--- a/pkg/analyzer/lib/src/error/codes.dart
+++ b/pkg/analyzer/lib/src/error/codes.dart
@@ -1188,6 +1188,10 @@
// #### Common fixes
//
// Choose a different name for the extension.
+ // TODO(brianwilkerson) When the documentation for
+ // 'BUILT_IN_IDENTIFIER_IN_DECLARATION' is committed it should replace the
+ // text above and the name of this code should be changed to match it. We
+ // also need to add a forward for this code at the same time.
static const CompileTimeErrorCode BUILT_IN_IDENTIFIER_AS_EXTENSION_NAME =
CompileTimeErrorCode('BUILT_IN_IDENTIFIER_AS_EXTENSION_NAME',
"The built-in identifier '{0}' can't be used as an extension name.",
@@ -1203,9 +1207,10 @@
* 0: the built-in identifier that is being used
*/
static const CompileTimeErrorCode BUILT_IN_IDENTIFIER_AS_PREFIX_NAME =
- CompileTimeErrorCode('BUILT_IN_IDENTIFIER_AS_PREFIX_NAME',
+ CompileTimeErrorCode('BUILT_IN_IDENTIFIER_IN_DECLARATION',
"The built-in identifier '{0}' can't be used as a prefix name.",
- correction: "Try choosing a different name for the prefix.");
+ correction: "Try choosing a different name for the prefix.",
+ uniqueName: 'BUILT_IN_IDENTIFIER_AS_PREFIX_NAME');
/**
* Parameters:
@@ -1247,9 +1252,10 @@
* 0: the built-in identifier that is being used
*/
static const CompileTimeErrorCode BUILT_IN_IDENTIFIER_AS_TYPE_NAME =
- CompileTimeErrorCode('BUILT_IN_IDENTIFIER_AS_TYPE_NAME',
+ CompileTimeErrorCode('BUILT_IN_IDENTIFIER_IN_DECLARATION',
"The built-in identifier '{0}' can't be used as a type name.",
- correction: "Try choosing a different name for the type.");
+ correction: "Try choosing a different name for the type.",
+ uniqueName: 'BUILT_IN_IDENTIFIER_AS_TYPE_NAME');
/**
* 16.33 Identifier Reference: It is a compile-time error if a built-in
@@ -1261,10 +1267,11 @@
*/
static const CompileTimeErrorCode BUILT_IN_IDENTIFIER_AS_TYPE_PARAMETER_NAME =
CompileTimeErrorCode(
- 'BUILT_IN_IDENTIFIER_AS_TYPE_PARAMETER_NAME',
+ 'BUILT_IN_IDENTIFIER_IN_DECLARATION',
"The built-in identifier '{0}' can't be used as a type parameter "
"name.",
- correction: "Try choosing a different name for the type parameter.");
+ correction: "Try choosing a different name for the type parameter.",
+ uniqueName: 'BUILT_IN_IDENTIFIER_AS_TYPE_PARAMETER_NAME');
/**
* 16.33 Identifier Reference: It is a compile-time error if a built-in
@@ -1275,9 +1282,10 @@
* 0: the built-in identifier that is being used
*/
static const CompileTimeErrorCode BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME =
- CompileTimeErrorCode('BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME',
+ CompileTimeErrorCode('BUILT_IN_IDENTIFIER_IN_DECLARATION',
"The built-in identifier '{0}' can't be used as a typedef name.",
- correction: "Try choosing a different name for the typedef.");
+ correction: "Try choosing a different name for the typedef.",
+ uniqueName: 'BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME');
/**
* No parameters.
diff --git a/tests/language/identifier/built_in_illegal_test.dart b/tests/language/identifier/built_in_illegal_test.dart
index 983a854..12be975 100644
--- a/tests/language/identifier/built_in_illegal_test.dart
+++ b/tests/language/identifier/built_in_illegal_test.dart
@@ -6,15 +6,15 @@
// Pseudo keywords are not allowed to be used as class names.
class abstract { }
// ^^^^^^^^
-// [analyzer] COMPILE_TIME_ERROR.BUILT_IN_IDENTIFIER_AS_TYPE_NAME
+// [analyzer] COMPILE_TIME_ERROR.BUILT_IN_IDENTIFIER_IN_DECLARATION
// [cfe] Can't use 'abstract' as a name here.
class as { }
// ^^
-// [analyzer] COMPILE_TIME_ERROR.BUILT_IN_IDENTIFIER_AS_TYPE_NAME
+// [analyzer] COMPILE_TIME_ERROR.BUILT_IN_IDENTIFIER_IN_DECLARATION
// [cfe] Can't use 'as' as a name here.
class dynamic { }
// ^^^^^^^
-// [analyzer] COMPILE_TIME_ERROR.BUILT_IN_IDENTIFIER_AS_TYPE_NAME
+// [analyzer] COMPILE_TIME_ERROR.BUILT_IN_IDENTIFIER_IN_DECLARATION
// [cfe] Can't use 'dynamic' as a name here.
class export { }
// ^^^^^^
@@ -38,11 +38,11 @@
// [analyzer] SYNTACTIC_ERROR.EXPECTED_TOKEN
class external { }
// ^^^^^^^^
-// [analyzer] COMPILE_TIME_ERROR.BUILT_IN_IDENTIFIER_AS_TYPE_NAME
+// [analyzer] COMPILE_TIME_ERROR.BUILT_IN_IDENTIFIER_IN_DECLARATION
// [cfe] Can't use 'external' as a name here.
class factory { }
// ^^^^^^^
-// [analyzer] COMPILE_TIME_ERROR.BUILT_IN_IDENTIFIER_AS_TYPE_NAME
+// [analyzer] COMPILE_TIME_ERROR.BUILT_IN_IDENTIFIER_IN_DECLARATION
// [cfe] Can't use 'factory' as a name here.
class get { }
// ^^^
@@ -56,7 +56,7 @@
// [cfe] Expected an identifier, but got 'get'.
class interface { }
// ^^^^^^^^^
-// [analyzer] COMPILE_TIME_ERROR.BUILT_IN_IDENTIFIER_AS_TYPE_NAME
+// [analyzer] COMPILE_TIME_ERROR.BUILT_IN_IDENTIFIER_IN_DECLARATION
// [cfe] Can't use 'interface' as a name here.
class implements { }
// ^^^^^^^^^^
@@ -118,7 +118,7 @@
// [cfe] Expected a declaration, but got '}'.
class operator { }
// ^^^^^^^^
-// [analyzer] COMPILE_TIME_ERROR.BUILT_IN_IDENTIFIER_AS_TYPE_NAME
+// [analyzer] COMPILE_TIME_ERROR.BUILT_IN_IDENTIFIER_IN_DECLARATION
// [cfe] Can't use 'operator' as a name here.
class part { }
// ^^^^
@@ -152,7 +152,7 @@
// [cfe] Expected an identifier, but got 'set'.
class static { }
// ^^^^^^
-// [analyzer] COMPILE_TIME_ERROR.BUILT_IN_IDENTIFIER_AS_TYPE_NAME
+// [analyzer] COMPILE_TIME_ERROR.BUILT_IN_IDENTIFIER_IN_DECLARATION
// [cfe] Can't use 'static' as a name here.
class typedef { }
// ^^^^^^^
diff --git a/tests/language_2/identifier/built_in_illegal_test.dart b/tests/language_2/identifier/built_in_illegal_test.dart
index 983a854..12be975 100644
--- a/tests/language_2/identifier/built_in_illegal_test.dart
+++ b/tests/language_2/identifier/built_in_illegal_test.dart
@@ -6,15 +6,15 @@
// Pseudo keywords are not allowed to be used as class names.
class abstract { }
// ^^^^^^^^
-// [analyzer] COMPILE_TIME_ERROR.BUILT_IN_IDENTIFIER_AS_TYPE_NAME
+// [analyzer] COMPILE_TIME_ERROR.BUILT_IN_IDENTIFIER_IN_DECLARATION
// [cfe] Can't use 'abstract' as a name here.
class as { }
// ^^
-// [analyzer] COMPILE_TIME_ERROR.BUILT_IN_IDENTIFIER_AS_TYPE_NAME
+// [analyzer] COMPILE_TIME_ERROR.BUILT_IN_IDENTIFIER_IN_DECLARATION
// [cfe] Can't use 'as' as a name here.
class dynamic { }
// ^^^^^^^
-// [analyzer] COMPILE_TIME_ERROR.BUILT_IN_IDENTIFIER_AS_TYPE_NAME
+// [analyzer] COMPILE_TIME_ERROR.BUILT_IN_IDENTIFIER_IN_DECLARATION
// [cfe] Can't use 'dynamic' as a name here.
class export { }
// ^^^^^^
@@ -38,11 +38,11 @@
// [analyzer] SYNTACTIC_ERROR.EXPECTED_TOKEN
class external { }
// ^^^^^^^^
-// [analyzer] COMPILE_TIME_ERROR.BUILT_IN_IDENTIFIER_AS_TYPE_NAME
+// [analyzer] COMPILE_TIME_ERROR.BUILT_IN_IDENTIFIER_IN_DECLARATION
// [cfe] Can't use 'external' as a name here.
class factory { }
// ^^^^^^^
-// [analyzer] COMPILE_TIME_ERROR.BUILT_IN_IDENTIFIER_AS_TYPE_NAME
+// [analyzer] COMPILE_TIME_ERROR.BUILT_IN_IDENTIFIER_IN_DECLARATION
// [cfe] Can't use 'factory' as a name here.
class get { }
// ^^^
@@ -56,7 +56,7 @@
// [cfe] Expected an identifier, but got 'get'.
class interface { }
// ^^^^^^^^^
-// [analyzer] COMPILE_TIME_ERROR.BUILT_IN_IDENTIFIER_AS_TYPE_NAME
+// [analyzer] COMPILE_TIME_ERROR.BUILT_IN_IDENTIFIER_IN_DECLARATION
// [cfe] Can't use 'interface' as a name here.
class implements { }
// ^^^^^^^^^^
@@ -118,7 +118,7 @@
// [cfe] Expected a declaration, but got '}'.
class operator { }
// ^^^^^^^^
-// [analyzer] COMPILE_TIME_ERROR.BUILT_IN_IDENTIFIER_AS_TYPE_NAME
+// [analyzer] COMPILE_TIME_ERROR.BUILT_IN_IDENTIFIER_IN_DECLARATION
// [cfe] Can't use 'operator' as a name here.
class part { }
// ^^^^
@@ -152,7 +152,7 @@
// [cfe] Expected an identifier, but got 'set'.
class static { }
// ^^^^^^
-// [analyzer] COMPILE_TIME_ERROR.BUILT_IN_IDENTIFIER_AS_TYPE_NAME
+// [analyzer] COMPILE_TIME_ERROR.BUILT_IN_IDENTIFIER_IN_DECLARATION
// [cfe] Can't use 'static' as a name here.
class typedef { }
// ^^^^^^^
diff --git a/tools/VERSION b/tools/VERSION
index 1f35b2e..46d1cb5 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -27,5 +27,5 @@
MAJOR 2
MINOR 14
PATCH 0
-PRERELEASE 41
+PRERELEASE 42
PRERELEASE_PATCH 0
\ No newline at end of file