diff --git a/pubspec.yaml b/pubspec.yaml index c5803542367..3a1385fa420 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -10,7 +10,7 @@ environment: sdk: ^3.0.0 dependencies: - analyzer: ^6.1.0 + analyzer: ^6.2.0 args: ^2.1.0 collection: ^1.15.0 http: ">=0.13.0 <2.0.0" diff --git a/test/rules/hash_and_equals_test.dart b/test/rules/hash_and_equals_test.dart index ace03553c9c..c68c117f4f7 100644 --- a/test/rules/hash_and_equals_test.dart +++ b/test/rules/hash_and_equals_test.dart @@ -41,7 +41,8 @@ extension type E(Object o) { } ''', [ // No lint. - // todo(pq): specify compilation error when it's reported. + error( + CompileTimeErrorCode.EXTENSION_TYPE_DECLARES_MEMBER_OF_OBJECT, 45, 2), ]); } } diff --git a/test/rules/library_private_types_in_public_api_test.dart b/test/rules/library_private_types_in_public_api_test.dart index ecc17da4abe..3f9cc19c2f0 100644 --- a/test/rules/library_private_types_in_public_api_test.dart +++ b/test/rules/library_private_types_in_public_api_test.dart @@ -137,7 +137,7 @@ extension type E(Object o) { } ''', [ // No lint. - // todo(pq): add compilation error once reported + error(CompileTimeErrorCode.EXTENSION_TYPE_DECLARES_INSTANCE_FIELD, 47, 1), ]); } diff --git a/test/rules/prefer_final_fields_test.dart b/test/rules/prefer_final_fields_test.dart index b392948d8a0..1c4e154c0db 100644 --- a/test/rules/prefer_final_fields_test.dart +++ b/test/rules/prefer_final_fields_test.dart @@ -27,9 +27,9 @@ extension type E(Object o) { int _i = 0; } ''', [ - error(WarningCode.UNUSED_FIELD, 35, 2), // No Lint. - // todo(pq): add compilation error once reported + error(CompileTimeErrorCode.EXTENSION_TYPE_DECLARES_INSTANCE_FIELD, 35, 2), + error(WarningCode.UNUSED_FIELD, 35, 2), ]); } diff --git a/test/rules/public_member_api_docs_test.dart b/test/rules/public_member_api_docs_test.dart index fff41bd1c9f..3e2150ef5d8 100644 --- a/test/rules/public_member_api_docs_test.dart +++ b/test/rules/public_member_api_docs_test.dart @@ -41,7 +41,7 @@ extension type E(int i) { } ''', [ // No lint. - // todo(pq): add compilation error once reported + error(CompileTimeErrorCode.EXTENSION_TYPE_DECLARES_INSTANCE_FIELD, 46, 1), ]); } diff --git a/test/rules/sort_unnamed_constructors_first_test.dart b/test/rules/sort_unnamed_constructors_first_test.dart index b135f2ef723..897e4fc2a60 100644 --- a/test/rules/sort_unnamed_constructors_first_test.dart +++ b/test/rules/sort_unnamed_constructors_first_test.dart @@ -86,7 +86,7 @@ extension type E(Object o) { } ''', [ // No lint. - // todo(pq): Add `duplicate_constructor` diagnostic when it is reported. + error(CompileTimeErrorCode.DUPLICATE_CONSTRUCTOR_DEFAULT, 46, 1), ]); } } diff --git a/test/rules/unnecessary_constructor_name_test.dart b/test/rules/unnecessary_constructor_name_test.dart index 09e4d39b5c4..48363afee33 100644 --- a/test/rules/unnecessary_constructor_name_test.dart +++ b/test/rules/unnecessary_constructor_name_test.dart @@ -69,7 +69,7 @@ extension type E(int i) { } ''', [ // No lint. - // Specify `duplicate_constructor` diagnostic once reported. + error(CompileTimeErrorCode.DUPLICATE_CONSTRUCTOR_DEFAULT, 28, 5), ]); } diff --git a/test/rules/use_late_for_private_fields_and_variables_test.dart b/test/rules/use_late_for_private_fields_and_variables_test.dart index 24220ecfae6..f6eef708226 100644 --- a/test/rules/use_late_for_private_fields_and_variables_test.dart +++ b/test/rules/use_late_for_private_fields_and_variables_test.dart @@ -26,9 +26,9 @@ extension type E(int i) { int? _i; } ''', [ - error(WarningCode.UNUSED_FIELD, 33, 2), // No lint. - // todo(pq): report invalid field diagnostic when it's reported. + error(CompileTimeErrorCode.EXTENSION_TYPE_DECLARES_INSTANCE_FIELD, 33, 2), + error(WarningCode.UNUSED_FIELD, 33, 2), ]); }