mirror of
https://github.com/dart-lang/sdk
synced 2024-09-19 20:51:50 +00:00
Rename several error codes and improve some messages
Change-Id: I6e629719dee14c2af7c1358145fb25b21f5d5157 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114160 Commit-Queue: Brian Wilkerson <brianwilkerson@google.com> Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
This commit is contained in:
parent
a35f4ec412
commit
5935b916e3
|
@ -66,7 +66,7 @@ const List<ErrorCode> errorCodeValues = const [
|
|||
CompileTimeErrorCode.ABSTRACT_SUPER_MEMBER_REFERENCE,
|
||||
CompileTimeErrorCode.ACCESS_PRIVATE_ENUM_FIELD,
|
||||
CompileTimeErrorCode.AMBIGUOUS_EXPORT,
|
||||
CompileTimeErrorCode.AMBIGUOUS_EXTENSION_METHOD_ACCESS,
|
||||
CompileTimeErrorCode.AMBIGUOUS_EXTENSION_MEMBER_ACCESS,
|
||||
CompileTimeErrorCode.AMBIGUOUS_SET_OR_MAP_LITERAL_BOTH,
|
||||
CompileTimeErrorCode.AMBIGUOUS_SET_OR_MAP_LITERAL_EITHER,
|
||||
CompileTimeErrorCode.ANNOTATION_WITH_NON_CLASS,
|
||||
|
@ -245,7 +245,7 @@ const List<ErrorCode> errorCodeValues = const [
|
|||
CompileTimeErrorCode.NON_GENERATIVE_CONSTRUCTOR,
|
||||
CompileTimeErrorCode.NON_SYNC_FACTORY,
|
||||
CompileTimeErrorCode.NOT_ASSIGNED_POTENTIALLY_NON_NULLABLE_LOCAL_VARIABLE,
|
||||
CompileTimeErrorCode.NOT_ENOUGH_REQUIRED_ARGUMENTS,
|
||||
CompileTimeErrorCode.NOT_ENOUGH_POSITIONAL_ARGUMENTS,
|
||||
CompileTimeErrorCode.NOT_INITIALIZED_NON_NULLABLE_INSTANCE_FIELD,
|
||||
CompileTimeErrorCode.NOT_INITIALIZED_NON_NULLABLE_INSTANCE_FIELD_CONSTRUCTOR,
|
||||
CompileTimeErrorCode.NOT_INITIALIZED_NON_NULLABLE_VARIABLE,
|
||||
|
|
|
@ -779,9 +779,9 @@ class HintCode extends ErrorCode {
|
|||
*/
|
||||
static const HintCode SDK_VERSION_UI_AS_CODE_IN_CONST_CONTEXT = const HintCode(
|
||||
'SDK_VERSION_UI_AS_CODE_IN_CONST_CONTEXT',
|
||||
"The for, if and spread elements were not supported in const contexts "
|
||||
"until version 2.5.0, but this code is required to be able to run on "
|
||||
"earlier versions.",
|
||||
"The for, if and spread elements weren't supported in constant "
|
||||
"expressions until version 2.5.0, but this code is required to be "
|
||||
"able to run on earlier versions.",
|
||||
correction: "Try updating the SDK constraints.");
|
||||
|
||||
/**
|
||||
|
|
|
@ -54,7 +54,7 @@ class ExtensionMemberResolver {
|
|||
}
|
||||
|
||||
_errorReporter.reportErrorForNode(
|
||||
CompileTimeErrorCode.AMBIGUOUS_EXTENSION_METHOD_ACCESS,
|
||||
CompileTimeErrorCode.AMBIGUOUS_EXTENSION_MEMBER_ACCESS,
|
||||
target,
|
||||
[
|
||||
name,
|
||||
|
|
|
@ -152,9 +152,9 @@ class CompileTimeErrorCode extends ErrorCode {
|
|||
* 1: the name of the first declaring extension
|
||||
* 2: the name of the second declaring extension
|
||||
*/
|
||||
static const CompileTimeErrorCode AMBIGUOUS_EXTENSION_METHOD_ACCESS =
|
||||
static const CompileTimeErrorCode AMBIGUOUS_EXTENSION_MEMBER_ACCESS =
|
||||
const CompileTimeErrorCode(
|
||||
'AMBIGUOUS_EXTENSION_METHOD_ACCESS',
|
||||
'AMBIGUOUS_EXTENSION_MEMBER_ACCESS',
|
||||
"A member named '{0}' is defined in extensions '{1}' and '{2}' and "
|
||||
"neither is more specific.",
|
||||
correction:
|
||||
|
@ -1366,8 +1366,6 @@ class CompileTimeErrorCode extends ErrorCode {
|
|||
* Parameters:
|
||||
* 0: the maximum number of positional arguments
|
||||
* 1: the actual number of positional arguments given
|
||||
*
|
||||
* See [NOT_ENOUGH_REQUIRED_ARGUMENTS].
|
||||
*/
|
||||
static const CompileTimeErrorCode EXTRA_POSITIONAL_ARGUMENTS_COULD_BE_NAMED =
|
||||
const CompileTimeErrorCode('EXTRA_POSITIONAL_ARGUMENTS_COULD_BE_NAMED',
|
||||
|
@ -1528,9 +1526,10 @@ class CompileTimeErrorCode extends ErrorCode {
|
|||
*/
|
||||
static const CompileTimeErrorCode IMPLEMENTS_NON_CLASS =
|
||||
const CompileTimeErrorCode('IMPLEMENTS_NON_CLASS',
|
||||
"Classes and mixins can only implement classes.",
|
||||
"Classes and mixins can only implement other classes and mixins.",
|
||||
correction:
|
||||
"Try specifying a class, or remove the name from the list.");
|
||||
"Try specifying a class or mixin, or remove the name from the "
|
||||
"list.");
|
||||
|
||||
/**
|
||||
* 10.10 Superinterfaces: It is a compile-time error if two elements in the
|
||||
|
@ -2666,19 +2665,13 @@ class CompileTimeErrorCode extends ErrorCode {
|
|||
"or mark it 'late'.");
|
||||
|
||||
/**
|
||||
* 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m < h</i>
|
||||
* or if <i>m > n</i>.
|
||||
*
|
||||
* 16.12.2 Const: It is a compile-time error if evaluation of a constant
|
||||
* object results in an uncaught exception being thrown.
|
||||
*
|
||||
* Parameters:
|
||||
* 0: the expected number of required arguments
|
||||
* 1: the actual number of positional arguments given
|
||||
*/
|
||||
static const CompileTimeErrorCode NOT_ENOUGH_REQUIRED_ARGUMENTS =
|
||||
const CompileTimeErrorCode('NOT_ENOUGH_REQUIRED_ARGUMENTS',
|
||||
"{0} required argument(s) expected, but {1} found.",
|
||||
static const CompileTimeErrorCode NOT_ENOUGH_POSITIONAL_ARGUMENTS =
|
||||
const CompileTimeErrorCode('NOT_ENOUGH_POSITIONAL_ARGUMENTS',
|
||||
"{0} positional argument(s) expected, but {1} found.",
|
||||
correction: "Try adding the missing arguments.");
|
||||
|
||||
/**
|
||||
|
@ -4596,8 +4589,6 @@ class StaticWarningCode extends ErrorCode {
|
|||
* Parameters:
|
||||
* 0: the maximum number of positional arguments
|
||||
* 1: the actual number of positional arguments given
|
||||
*
|
||||
* See [NOT_ENOUGH_REQUIRED_ARGUMENTS].
|
||||
*/
|
||||
static const StaticWarningCode EXTRA_POSITIONAL_ARGUMENTS =
|
||||
const StaticWarningCode('EXTRA_POSITIONAL_ARGUMENTS',
|
||||
|
@ -4611,8 +4602,6 @@ class StaticWarningCode extends ErrorCode {
|
|||
* Parameters:
|
||||
* 0: the maximum number of positional arguments
|
||||
* 1: the actual number of positional arguments given
|
||||
*
|
||||
* See [NOT_ENOUGH_REQUIRED_ARGUMENTS].
|
||||
*/
|
||||
static const StaticWarningCode EXTRA_POSITIONAL_ARGUMENTS_COULD_BE_NAMED =
|
||||
const StaticWarningCode('EXTRA_POSITIONAL_ARGUMENTS_COULD_BE_NAMED',
|
||||
|
@ -5214,8 +5203,6 @@ class StaticWarningCode extends ErrorCode {
|
|||
* Parameters:
|
||||
* 0: the expected number of required arguments
|
||||
* 1: the actual number of positional arguments given
|
||||
*
|
||||
* See [EXTRA_POSITIONAL_ARGUMENTS].
|
||||
*/
|
||||
static const StaticWarningCode NOT_ENOUGH_REQUIRED_ARGUMENTS =
|
||||
const StaticWarningCode('NOT_ENOUGH_REQUIRED_ARGUMENTS',
|
||||
|
|
|
@ -5064,7 +5064,7 @@ class ResolverVisitor extends ScopedVisitor {
|
|||
}
|
||||
if (positionalArgumentCount < requiredParameterCount && noBlankArguments) {
|
||||
ErrorCode errorCode = (reportAsError
|
||||
? CompileTimeErrorCode.NOT_ENOUGH_REQUIRED_ARGUMENTS
|
||||
? CompileTimeErrorCode.NOT_ENOUGH_POSITIONAL_ARGUMENTS
|
||||
: StaticWarningCode.NOT_ENOUGH_REQUIRED_ARGUMENTS);
|
||||
if (onError != null) {
|
||||
onError(errorCode, argumentList,
|
||||
|
|
|
@ -3735,7 +3735,7 @@ main() {
|
|||
const A();
|
||||
}
|
||||
''', [
|
||||
error(CompileTimeErrorCode.NOT_ENOUGH_REQUIRED_ARGUMENTS, 48, 2),
|
||||
error(CompileTimeErrorCode.NOT_ENOUGH_POSITIONAL_ARGUMENTS, 48, 2),
|
||||
]);
|
||||
}
|
||||
|
||||
|
@ -3748,7 +3748,7 @@ class B extends A {
|
|||
const B() : super();
|
||||
}
|
||||
''', [
|
||||
error(CompileTimeErrorCode.NOT_ENOUGH_REQUIRED_ARGUMENTS, 69, 2),
|
||||
error(CompileTimeErrorCode.NOT_ENOUGH_POSITIONAL_ARGUMENTS, 69, 2),
|
||||
]);
|
||||
}
|
||||
|
||||
|
@ -4739,7 +4739,7 @@ var s5 = const Symbol('x', foo: 'x');
|
|||
error(CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION, 9, 17),
|
||||
error(CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION, 37, 15),
|
||||
error(StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 50, 1),
|
||||
error(CompileTimeErrorCode.NOT_ENOUGH_REQUIRED_ARGUMENTS, 75, 2),
|
||||
error(CompileTimeErrorCode.NOT_ENOUGH_POSITIONAL_ARGUMENTS, 75, 2),
|
||||
error(CompileTimeErrorCode.EXTRA_POSITIONAL_ARGUMENTS, 100, 10),
|
||||
error(CompileTimeErrorCode.UNDEFINED_NAMED_PARAMETER, 139, 3),
|
||||
]);
|
||||
|
|
|
@ -315,7 +315,7 @@ f(Object o, A a, B b) {
|
|||
o.a;
|
||||
}
|
||||
''', [
|
||||
error(CompileTimeErrorCode.AMBIGUOUS_EXTENSION_METHOD_ACCESS, 68, 1),
|
||||
error(CompileTimeErrorCode.AMBIGUOUS_EXTENSION_MEMBER_ACCESS, 68, 1),
|
||||
]);
|
||||
}
|
||||
|
||||
|
|
|
@ -11,12 +11,12 @@ import '../dart/resolution/driver_resolution.dart';
|
|||
|
||||
main() {
|
||||
defineReflectiveSuite(() {
|
||||
defineReflectiveTests(AmbiguousExtensionMethodAccessTest);
|
||||
defineReflectiveTests(AmbiguousExtensionMemberAccessTest);
|
||||
});
|
||||
}
|
||||
|
||||
@reflectiveTest
|
||||
class AmbiguousExtensionMethodAccessTest extends DriverResolutionTest {
|
||||
class AmbiguousExtensionMemberAccessTest extends DriverResolutionTest {
|
||||
@override
|
||||
AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
|
||||
..contextFeatures = new FeatureSet.forTesting(
|
||||
|
@ -36,7 +36,7 @@ extension E2 on A {
|
|||
|
||||
int f(A a) => a();
|
||||
''', [
|
||||
error(CompileTimeErrorCode.AMBIGUOUS_EXTENSION_METHOD_ACCESS, 110, 1),
|
||||
error(CompileTimeErrorCode.AMBIGUOUS_EXTENSION_MEMBER_ACCESS, 110, 1),
|
||||
]);
|
||||
}
|
||||
|
||||
|
@ -56,7 +56,7 @@ f(A a) {
|
|||
a.a;
|
||||
}
|
||||
''', [
|
||||
error(CompileTimeErrorCode.AMBIGUOUS_EXTENSION_METHOD_ACCESS, 109, 1),
|
||||
error(CompileTimeErrorCode.AMBIGUOUS_EXTENSION_MEMBER_ACCESS, 109, 1),
|
||||
]);
|
||||
}
|
||||
|
||||
|
@ -76,7 +76,7 @@ f(A a) {
|
|||
a.a();
|
||||
}
|
||||
''', [
|
||||
error(CompileTimeErrorCode.AMBIGUOUS_EXTENSION_METHOD_ACCESS, 99, 1),
|
||||
error(CompileTimeErrorCode.AMBIGUOUS_EXTENSION_MEMBER_ACCESS, 99, 1),
|
||||
]);
|
||||
}
|
||||
|
||||
|
@ -95,7 +95,7 @@ extension E2 on A {
|
|||
|
||||
A f(A a) => a + a;
|
||||
''', [
|
||||
error(CompileTimeErrorCode.AMBIGUOUS_EXTENSION_METHOD_ACCESS, 122, 5),
|
||||
error(CompileTimeErrorCode.AMBIGUOUS_EXTENSION_MEMBER_ACCESS, 122, 5),
|
||||
]);
|
||||
}
|
||||
|
||||
|
@ -113,7 +113,7 @@ extension E2 on A {
|
|||
|
||||
int f(A a) => a[0];
|
||||
''', [
|
||||
error(CompileTimeErrorCode.AMBIGUOUS_EXTENSION_METHOD_ACCESS, 134, 1),
|
||||
error(CompileTimeErrorCode.AMBIGUOUS_EXTENSION_MEMBER_ACCESS, 134, 1),
|
||||
]);
|
||||
}
|
||||
|
||||
|
@ -131,7 +131,7 @@ extension E2 on A {
|
|||
|
||||
int f(A a) => -a;
|
||||
''', [
|
||||
error(CompileTimeErrorCode.AMBIGUOUS_EXTENSION_METHOD_ACCESS, 123, 1),
|
||||
error(CompileTimeErrorCode.AMBIGUOUS_EXTENSION_MEMBER_ACCESS, 123, 1),
|
||||
]);
|
||||
}
|
||||
|
||||
|
@ -151,7 +151,7 @@ f(A a) {
|
|||
a.a = 3;
|
||||
}
|
||||
''', [
|
||||
error(CompileTimeErrorCode.AMBIGUOUS_EXTENSION_METHOD_ACCESS, 99, 1),
|
||||
error(CompileTimeErrorCode.AMBIGUOUS_EXTENSION_MEMBER_ACCESS, 99, 1),
|
||||
]);
|
||||
}
|
||||
}
|
|
@ -5,8 +5,8 @@
|
|||
import 'package:test_reflective_loader/test_reflective_loader.dart';
|
||||
|
||||
import 'ambiguous_export_test.dart' as ambiguous_export;
|
||||
import 'ambiguous_extension_method_access_test.dart'
|
||||
as ambiguous_extension_method_access;
|
||||
import 'ambiguous_extension_member_access_test.dart'
|
||||
as ambiguous_extension_member_access;
|
||||
import 'ambiguous_import_test.dart' as ambiguous_import;
|
||||
import 'ambiguous_set_or_map_literal_test.dart' as ambiguous_set_or_map_literal;
|
||||
import 'argument_type_not_assignable_test.dart' as argument_type_not_assignable;
|
||||
|
@ -301,7 +301,7 @@ import 'wrong_type_parameter_variance_in_superinterface_test.dart'
|
|||
main() {
|
||||
defineReflectiveSuite(() {
|
||||
ambiguous_export.main();
|
||||
ambiguous_extension_method_access.main();
|
||||
ambiguous_extension_member_access.main();
|
||||
ambiguous_import.main();
|
||||
ambiguous_set_or_map_literal.main();
|
||||
argument_type_not_assignable.main();
|
||||
|
|
|
@ -95,24 +95,24 @@ extension MyExt on A {
|
|||
// ^^^
|
||||
// [cfe] unspecified
|
||||
// ^^^^^^^^^^^^^^^^^^
|
||||
// [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_METHOD_ACCESS
|
||||
// [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS
|
||||
checkExtensionValue(t0);
|
||||
bool t1 = this.getterInGlobalScope;
|
||||
// ^^^
|
||||
// [cfe] unspecified
|
||||
// ^^^^^^^^^^^^^^^^^^^
|
||||
// [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_METHOD_ACCESS
|
||||
// [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS
|
||||
checkExtensionValue(t1);
|
||||
this.setterInGlobalScope = extensionValue;
|
||||
// ^^^
|
||||
// [cfe] unspecified
|
||||
// ^^^^^^^^^^^^^^^^^^^
|
||||
// [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_METHOD_ACCESS
|
||||
// [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS
|
||||
bool t2 = this.methodInGlobalScope();
|
||||
// ^^^
|
||||
// [cfe] unspecified
|
||||
// ^^^^^^^^^^^^^^^^^^^
|
||||
// [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_METHOD_ACCESS
|
||||
// [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS
|
||||
checkExtensionValue(t2);
|
||||
}
|
||||
|
||||
|
@ -143,24 +143,24 @@ extension MyExt on A {
|
|||
// ^^^
|
||||
// [cfe] unspecified
|
||||
// ^^^^^^^^^^^^^^^^^^
|
||||
// [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_METHOD_ACCESS
|
||||
// [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS
|
||||
checkExtensionValue(t0);
|
||||
bool t1 = self.getterInGlobalScope;
|
||||
// ^^^
|
||||
// [cfe] unspecified
|
||||
// ^^^^^^^^^^^^^^^^^^^
|
||||
// [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_METHOD_ACCESS
|
||||
// [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS
|
||||
checkExtensionValue(t1);
|
||||
self.setterInGlobalScope = extensionValue;
|
||||
// ^^^
|
||||
// [cfe] unspecified
|
||||
// ^^^^^^^^^^^^^^^^^^^
|
||||
// [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_METHOD_ACCESS
|
||||
// [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS
|
||||
bool t2 = self.methodInGlobalScope();
|
||||
// ^^^
|
||||
// [cfe] unspecified
|
||||
// ^^^^^^^^^^^^^^^^^^^
|
||||
// [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_METHOD_ACCESS
|
||||
// [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS
|
||||
checkExtensionValue(t2);
|
||||
}
|
||||
|
||||
|
@ -232,24 +232,24 @@ void main() {
|
|||
// ^^^
|
||||
// [cfe] unspecified
|
||||
// ^^^^^^^^^^^^^^^^^^
|
||||
// [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_METHOD_ACCESS
|
||||
// [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS
|
||||
checkExtensionValue(t0);
|
||||
bool t1 = a.getterInGlobalScope;
|
||||
// ^^^
|
||||
// [cfe] unspecified
|
||||
// ^^^^^^^^^^^^^^^^^^^
|
||||
// [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_METHOD_ACCESS
|
||||
// [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS
|
||||
checkExtensionValue(t1);
|
||||
a.setterInGlobalScope = extensionValue;
|
||||
//^^^^^^^^^^^^^^^^^^^
|
||||
// [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_METHOD_ACCESS
|
||||
// [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS
|
||||
// ^^^
|
||||
// [cfe] unspecified
|
||||
bool t2 = a.methodInGlobalScope();
|
||||
// ^^^
|
||||
// [cfe] unspecified
|
||||
// ^^^^^^^^^^^^^^^^^^^
|
||||
// [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_METHOD_ACCESS
|
||||
// [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS
|
||||
checkExtensionValue(t2);
|
||||
}
|
||||
|
||||
|
|
|
@ -95,24 +95,24 @@ extension MyExt on A {
|
|||
// ^^^
|
||||
// [cfe] unspecified
|
||||
// ^^^^^^^^^^^^^^^^^^
|
||||
// [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_METHOD_ACCESS
|
||||
// [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS
|
||||
checkExtensionValue(t0);
|
||||
bool t1 = this.getterInGlobalScope;
|
||||
// ^^^
|
||||
// [cfe] unspecified
|
||||
// ^^^^^^^^^^^^^^^^^^^
|
||||
// [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_METHOD_ACCESS
|
||||
// [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS
|
||||
checkExtensionValue(t1);
|
||||
this.setterInGlobalScope = extensionValue;
|
||||
// ^^^
|
||||
// [cfe] unspecified
|
||||
// ^^^^^^^^^^^^^^^^^^^
|
||||
// [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_METHOD_ACCESS
|
||||
// [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS
|
||||
bool t2 = this.methodInGlobalScope();
|
||||
// ^^^
|
||||
// [cfe] unspecified
|
||||
// ^^^^^^^^^^^^^^^^^^^
|
||||
// [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_METHOD_ACCESS
|
||||
// [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS
|
||||
checkExtensionValue(t2);
|
||||
}
|
||||
|
||||
|
@ -128,24 +128,24 @@ extension MyExt on A {
|
|||
// ^^^
|
||||
// [cfe] unspecified
|
||||
// ^^^^^^^^^^^^^^^^^^^^^
|
||||
// [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_METHOD_ACCESS
|
||||
// [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS
|
||||
checkExtensionValue(t0);
|
||||
bool t1 = this.getterInExtensionScope;
|
||||
// ^^^
|
||||
// [cfe] unspecified
|
||||
// ^^^^^^^^^^^^^^^^^^^^^^
|
||||
// [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_METHOD_ACCESS
|
||||
// [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS
|
||||
checkExtensionValue(t1);
|
||||
this.setterInExtensionScope = extensionValue;
|
||||
// ^^^
|
||||
// [cfe] unspecified
|
||||
// ^^^^^^^^^^^^^^^^^^^^^^
|
||||
// [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_METHOD_ACCESS
|
||||
// [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS
|
||||
bool t2 = this.methodInExtensionScope();
|
||||
// ^^^
|
||||
// [cfe] unspecified
|
||||
// ^^^^^^^^^^^^^^^^^^^^^^
|
||||
// [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_METHOD_ACCESS
|
||||
// [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS
|
||||
checkExtensionValue(t2);
|
||||
}
|
||||
|
||||
|
@ -165,24 +165,24 @@ extension MyExt on A {
|
|||
// ^^^
|
||||
// [cfe] unspecified
|
||||
// ^^^^^^^^^^^^^^^^^^
|
||||
// [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_METHOD_ACCESS
|
||||
// [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS
|
||||
checkExtensionValue(t0);
|
||||
bool t1 = self.getterInGlobalScope;
|
||||
// ^^^
|
||||
// [cfe] unspecified
|
||||
// ^^^^^^^^^^^^^^^^^^^
|
||||
// [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_METHOD_ACCESS
|
||||
// [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS
|
||||
checkExtensionValue(t1);
|
||||
self.setterInGlobalScope = extensionValue;
|
||||
// ^^^
|
||||
// [cfe] unspecified
|
||||
// ^^^^^^^^^^^^^^^^^^^
|
||||
// [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_METHOD_ACCESS
|
||||
// [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS
|
||||
bool t2 = self.methodInGlobalScope();
|
||||
// ^^^
|
||||
// [cfe] unspecified
|
||||
// ^^^^^^^^^^^^^^^^^^^
|
||||
// [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_METHOD_ACCESS
|
||||
// [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS
|
||||
checkExtensionValue(t2);
|
||||
}
|
||||
|
||||
|
@ -198,24 +198,24 @@ extension MyExt on A {
|
|||
// ^^^
|
||||
// [cfe] unspecified
|
||||
// ^^^^^^^^^^^^^^^^^^^^^
|
||||
// [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_METHOD_ACCESS
|
||||
// [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS
|
||||
checkExtensionValue(t0);
|
||||
bool t1 = self.getterInExtensionScope;
|
||||
// ^^^
|
||||
// [cfe] unspecified
|
||||
// ^^^^^^^^^^^^^^^^^^^^^^
|
||||
// [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_METHOD_ACCESS
|
||||
// [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS
|
||||
checkExtensionValue(t1);
|
||||
self.setterInExtensionScope = extensionValue;
|
||||
// ^^^
|
||||
// [cfe] unspecified
|
||||
// ^^^^^^^^^^^^^^^^^^^^^^
|
||||
// [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_METHOD_ACCESS
|
||||
// [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS
|
||||
bool t2 = self.methodInExtensionScope();
|
||||
// ^^^
|
||||
// [cfe] unspecified
|
||||
// ^^^^^^^^^^^^^^^^^^^^^^
|
||||
// [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_METHOD_ACCESS
|
||||
// [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS
|
||||
checkExtensionValue(t2);
|
||||
}
|
||||
|
||||
|
@ -254,7 +254,7 @@ class B extends A {
|
|||
// ^^^
|
||||
// [cfe] unspecified
|
||||
// ^^^^^^^^^^^^^^^^^^^^^
|
||||
// [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_METHOD_ACCESS
|
||||
// [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS
|
||||
// ^^^^^^^^^^^^^^^^^^^^^
|
||||
// [analyzer] STATIC_WARNING.UNDEFINED_IDENTIFIER
|
||||
checkExtensionValue(t0);
|
||||
|
@ -262,13 +262,13 @@ class B extends A {
|
|||
// ^^^
|
||||
// [cfe] unspecified
|
||||
// ^^^^^^^^^^^^^^^^^^^^^^
|
||||
// [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_METHOD_ACCESS
|
||||
// [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS
|
||||
// ^^^^^^^^^^^^^^^^^^^^^^
|
||||
// [analyzer] STATIC_WARNING.UNDEFINED_IDENTIFIER
|
||||
checkExtensionValue(t1);
|
||||
setterInExtensionScope = extensionValue;
|
||||
// ^^^^^^^^^^^^^^^^^^^^^^
|
||||
// [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_METHOD_ACCESS
|
||||
// [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS
|
||||
// ^^^^^^^^^^^^^^^^^^^^^^
|
||||
// [analyzer] STATIC_WARNING.UNDEFINED_IDENTIFIER
|
||||
// ^^^
|
||||
|
@ -277,7 +277,7 @@ class B extends A {
|
|||
// ^^^
|
||||
// [cfe] unspecified
|
||||
// ^^^^^^^^^^^^^^^^^^^^^^
|
||||
// [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_METHOD_ACCESS
|
||||
// [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS
|
||||
// ^^^^^^^^^^^^^^^^^^^^^^
|
||||
// [analyzer] STATIC_TYPE_WARNING.UNDEFINED_METHOD
|
||||
checkExtensionValue(t2);
|
||||
|
@ -305,24 +305,24 @@ void main() {
|
|||
// ^^^
|
||||
// [cfe] unspecified
|
||||
// ^^^^^^^^^^^^^^^^^^
|
||||
// [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_METHOD_ACCESS
|
||||
// [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS
|
||||
checkExtensionValue(t0);
|
||||
bool t1 = a.getterInGlobalScope;
|
||||
// ^^^
|
||||
// [cfe] unspecified
|
||||
// ^^^^^^^^^^^^^^^^^^^
|
||||
// [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_METHOD_ACCESS
|
||||
// [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS
|
||||
checkExtensionValue(t1);
|
||||
a.setterInGlobalScope = extensionValue;
|
||||
//^^^^^^^^^^^^^^^^^^^
|
||||
// [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_METHOD_ACCESS
|
||||
// [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS
|
||||
// ^^^
|
||||
// [cfe] unspecified
|
||||
bool t2 = a.methodInGlobalScope();
|
||||
// ^^^
|
||||
// [cfe] unspecified
|
||||
// ^^^^^^^^^^^^^^^^^^^
|
||||
// [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_METHOD_ACCESS
|
||||
// [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS
|
||||
checkExtensionValue(t2);
|
||||
}
|
||||
|
||||
|
@ -338,24 +338,24 @@ void main() {
|
|||
// ^^^
|
||||
// [cfe] unspecified
|
||||
// ^^^^^^^^^^^^^^^^^^^^^
|
||||
// [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_METHOD_ACCESS
|
||||
// [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS
|
||||
checkExtensionValue(t0);
|
||||
bool t1 = a.getterInExtensionScope;
|
||||
// ^^^
|
||||
// [cfe] unspecified
|
||||
// ^^^^^^^^^^^^^^^^^^^^^^
|
||||
// [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_METHOD_ACCESS
|
||||
// [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS
|
||||
checkExtensionValue(t1);
|
||||
a.setterInExtensionScope = extensionValue;
|
||||
//^^^^^^^^^^^^^^^^^^^^^^
|
||||
// [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_METHOD_ACCESS
|
||||
// [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS
|
||||
// ^^^
|
||||
// [cfe] unspecified
|
||||
bool t2 = a.methodInExtensionScope();
|
||||
// ^^^
|
||||
// [cfe] unspecified
|
||||
// ^^^^^^^^^^^^^^^^^^^^^^
|
||||
// [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_METHOD_ACCESS
|
||||
// [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS
|
||||
checkExtensionValue(t2);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue