From 5935b916e3b54a158de920ed3feb5d25a241e635 Mon Sep 17 00:00:00 2001 From: Brian Wilkerson Date: Thu, 22 Aug 2019 20:08:53 +0000 Subject: [PATCH] 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 Reviewed-by: Konstantin Shcheglov --- pkg/analyzer/lib/error/error.dart | 4 +- .../lib/src/dart/error/hint_codes.dart | 6 +- .../resolver/extension_member_resolver.dart | 2 +- pkg/analyzer/lib/src/error/codes.dart | 29 +++------- pkg/analyzer/lib/src/generated/resolver.dart | 2 +- .../generated/compile_time_error_code.dart | 6 +- .../resolution/extension_method_test.dart | 2 +- ...biguous_extension_member_access_test.dart} | 18 +++--- .../test/src/diagnostics/test_all.dart | 6 +- ...sion_internal_resolution_3_error_test.dart | 24 ++++---- ...sion_internal_resolution_4_error_test.dart | 56 +++++++++---------- 11 files changed, 71 insertions(+), 84 deletions(-) rename pkg/analyzer/test/src/diagnostics/{ambiguous_extension_method_access_test.dart => ambiguous_extension_member_access_test.dart} (80%) diff --git a/pkg/analyzer/lib/error/error.dart b/pkg/analyzer/lib/error/error.dart index e5a420059e5..fde3636f905 100644 --- a/pkg/analyzer/lib/error/error.dart +++ b/pkg/analyzer/lib/error/error.dart @@ -66,7 +66,7 @@ const List 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 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, diff --git a/pkg/analyzer/lib/src/dart/error/hint_codes.dart b/pkg/analyzer/lib/src/dart/error/hint_codes.dart index 4802b288b62..ae53a879d57 100644 --- a/pkg/analyzer/lib/src/dart/error/hint_codes.dart +++ b/pkg/analyzer/lib/src/dart/error/hint_codes.dart @@ -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."); /** diff --git a/pkg/analyzer/lib/src/dart/resolver/extension_member_resolver.dart b/pkg/analyzer/lib/src/dart/resolver/extension_member_resolver.dart index 1f867088f6e..5c5742e73c7 100644 --- a/pkg/analyzer/lib/src/dart/resolver/extension_member_resolver.dart +++ b/pkg/analyzer/lib/src/dart/resolver/extension_member_resolver.dart @@ -54,7 +54,7 @@ class ExtensionMemberResolver { } _errorReporter.reportErrorForNode( - CompileTimeErrorCode.AMBIGUOUS_EXTENSION_METHOD_ACCESS, + CompileTimeErrorCode.AMBIGUOUS_EXTENSION_MEMBER_ACCESS, target, [ name, diff --git a/pkg/analyzer/lib/src/error/codes.dart b/pkg/analyzer/lib/src/error/codes.dart index d8c39deadd4..fe637f4327c 100644 --- a/pkg/analyzer/lib/src/error/codes.dart +++ b/pkg/analyzer/lib/src/error/codes.dart @@ -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 m < h - * or if m > n. - * - * 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', diff --git a/pkg/analyzer/lib/src/generated/resolver.dart b/pkg/analyzer/lib/src/generated/resolver.dart index 4aa5f806e5f..5d454a5d7d2 100644 --- a/pkg/analyzer/lib/src/generated/resolver.dart +++ b/pkg/analyzer/lib/src/generated/resolver.dart @@ -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, diff --git a/pkg/analyzer/test/generated/compile_time_error_code.dart b/pkg/analyzer/test/generated/compile_time_error_code.dart index 899e2e5ba86..4e24a14e372 100644 --- a/pkg/analyzer/test/generated/compile_time_error_code.dart +++ b/pkg/analyzer/test/generated/compile_time_error_code.dart @@ -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), ]); diff --git a/pkg/analyzer/test/src/dart/resolution/extension_method_test.dart b/pkg/analyzer/test/src/dart/resolution/extension_method_test.dart index 2f3e16d036a..117e3c91999 100644 --- a/pkg/analyzer/test/src/dart/resolution/extension_method_test.dart +++ b/pkg/analyzer/test/src/dart/resolution/extension_method_test.dart @@ -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), ]); } diff --git a/pkg/analyzer/test/src/diagnostics/ambiguous_extension_method_access_test.dart b/pkg/analyzer/test/src/diagnostics/ambiguous_extension_member_access_test.dart similarity index 80% rename from pkg/analyzer/test/src/diagnostics/ambiguous_extension_method_access_test.dart rename to pkg/analyzer/test/src/diagnostics/ambiguous_extension_member_access_test.dart index 21ffe97bc29..6a46b65b4c0 100644 --- a/pkg/analyzer/test/src/diagnostics/ambiguous_extension_method_access_test.dart +++ b/pkg/analyzer/test/src/diagnostics/ambiguous_extension_member_access_test.dart @@ -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), ]); } } diff --git a/pkg/analyzer/test/src/diagnostics/test_all.dart b/pkg/analyzer/test/src/diagnostics/test_all.dart index 2fcb5b18851..749012bc85b 100644 --- a/pkg/analyzer/test/src/diagnostics/test_all.dart +++ b/pkg/analyzer/test/src/diagnostics/test_all.dart @@ -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(); diff --git a/tests/language_2/extension_methods/static_extension_internal_resolution_3_error_test.dart b/tests/language_2/extension_methods/static_extension_internal_resolution_3_error_test.dart index e1f92af5271..8803cad7777 100644 --- a/tests/language_2/extension_methods/static_extension_internal_resolution_3_error_test.dart +++ b/tests/language_2/extension_methods/static_extension_internal_resolution_3_error_test.dart @@ -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); } diff --git a/tests/language_2/extension_methods/static_extension_internal_resolution_4_error_test.dart b/tests/language_2/extension_methods/static_extension_internal_resolution_4_error_test.dart index db4b51b9842..56798566214 100644 --- a/tests/language_2/extension_methods/static_extension_internal_resolution_4_error_test.dart +++ b/tests/language_2/extension_methods/static_extension_internal_resolution_4_error_test.dart @@ -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); }