Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit bb04f14

Browse files
committed
Update CFE expectations for extension method tests.
Change-Id: I04662433cb031043714d5ad0a1050a5398b1cf95 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/120740 Reviewed-by: Bob Nystrom <rnystrom@google.com>
1 parent 1f6c93a commit bb04f14

File tree

1 file changed

+15
-8
lines changed

1 file changed

+15
-8
lines changed

tests/language_2/extension_methods/static_extension_internal_name_conflict_error_test.dart

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ extension E3 on int {
8484
static void set field2(int value) {}
8585
// ^^^^^^
8686
// [analyzer] COMPILE_TIME_ERROR.DUPLICATE_DEFINITION
87-
// [cfe] unspecified
8887
}
8988

9089
// Check instance members colliding with instance members (of the same kind).
@@ -121,9 +120,11 @@ extension E5 on int {
121120
static int get property2 => 1;
122121
// ^^^^^^^^^
123122
// [analyzer] COMPILE_TIME_ERROR.EXTENSION_CONFLICTING_STATIC_AND_INSTANCE
123+
// [cfe] Conflicts with setter 'property2'.
124124
static void set property3(int x) {}
125125
// ^^^^^^^^^
126126
// [analyzer] COMPILE_TIME_ERROR.EXTENSION_CONFLICTING_STATIC_AND_INSTANCE
127+
// [cfe] Conflicts with member 'property3'.
127128
static int field = 3;
128129
// ^^^^^
129130
// [analyzer] COMPILE_TIME_ERROR.EXTENSION_CONFLICTING_STATIC_AND_INSTANCE
@@ -142,11 +143,11 @@ extension E5 on int {
142143
// ^
143144
// [cfe] 'property' is already declared in this scope.
144145
void set property2(int value) {}
145-
// ^^^^^^^^^
146-
// [cfe] unspecified
146+
// ^
147+
// [cfe] Conflicts with member 'property2'.
147148
int get property3 => 1;
148-
// ^^^^^^^^^
149-
// [cfe] unspecified
149+
// ^
150+
// [cfe] Conflicts with setter 'property3'.
150151
void set field(int value) {}
151152
// ^
152153
// [cfe] Conflicts with member 'field'.
@@ -196,10 +197,12 @@ extension E9 on int {
196197
// Check an instance method colliding with an instance setter.
197198
extension E10 on int {
198199
int method() => 0;
200+
// ^
201+
// [cfe] Conflicts with setter 'method'.
199202
void set method(int value) {}
200203
// ^^^^^^
201204
// [analyzer] COMPILE_TIME_ERROR.DUPLICATE_DEFINITION
202-
// [cfe] unspecified
205+
// [cfe] Conflicts with member 'method'.
203206
}
204207

205208
// Check a static method colliding with an instance getter.
@@ -217,8 +220,10 @@ extension E12 on int {
217220
static int method() => 0;
218221
// ^^^^^^
219222
// [analyzer] COMPILE_TIME_ERROR.EXTENSION_CONFLICTING_STATIC_AND_INSTANCE
220-
// [cfe] unspecified
223+
// [cfe] Conflicts with setter 'method'.
221224
void set method(int value) {}
225+
// ^
226+
// [cfe] Conflicts with member 'method'.
222227
}
223228

224229
// Check an instance method colliding with a static getter.
@@ -233,10 +238,12 @@ extension E13 on int {
233238
// Check an instance method colliding with a static setter.
234239
extension E14 on int {
235240
int method() => 0;
241+
// ^
242+
// [cfe] Conflicts with setter 'method'.
236243
static void set method(int value) {}
237244
// ^^^^^^
238245
// [analyzer] COMPILE_TIME_ERROR.EXTENSION_CONFLICTING_STATIC_AND_INSTANCE
239-
// [cfe] unspecified
246+
// [cfe] Conflicts with member 'method'.
240247
}
241248

242249
// Check an instance method colliding with a static field.

0 commit comments

Comments
 (0)