Skip to content

Commit 6d9c651

Browse files
committed
Fix typos in static_extension_internal_resolution tests.
Fix #37791 Fix #37792 Change-Id: Id00f7e3eacb6c44ed1914ad0a5748bc800a80af4 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112404 Reviewed-by: Brian Wilkerson <[email protected]>
1 parent 8c834ef commit 6d9c651

10 files changed

+116
-27
lines changed

tests/language_2/extension_methods/static_extension_internal_resolution_0_test.dart

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,22 @@
1212

1313
import "package:expect/expect.dart";
1414

15-
// Bring global members into scope
15+
/////////////////////////////////////////////////////////////////////////
16+
// Note: These imports may be deliberately unused. They bring certain
17+
// names into scope, in order to test that certain resolution choices are
18+
// made even in the presence of other symbols.
19+
/////////////////////////////////////////////////////////////////////////
20+
21+
// Do Not Delete.
22+
// Bring global members into scope.
1623
import "helpers/global_scope.dart";
1724

18-
// Bring a class A with instance members into scope
25+
// Do Not Delete.
26+
// Bring a class A with instance members into scope.
1927
import "helpers/class_no_shadow.dart";
2028

21-
// Bring an extension ExtraExt with no overlapping symbols into scope
29+
// Do Not Delete.
30+
// Bring an extension ExtraExt with no overlapping symbols into scope.
2231
import "helpers/extension_only.dart";
2332

2433
const bool extensionValue = true;

tests/language_2/extension_methods/static_extension_internal_resolution_1_test.dart

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,23 @@
1212

1313
import "package:expect/expect.dart";
1414

15-
// Bring global members into scope
15+
/////////////////////////////////////////////////////////////////////////
16+
// Note: These imports may be deliberately unused. They bring certain
17+
// names into scope, in order to test that certain resolution choices are
18+
// made even in the presence of other symbols.
19+
/////////////////////////////////////////////////////////////////////////
20+
21+
// Do Not Delete.
22+
// Bring global members into scope.
1623
import "helpers/global_scope.dart";
1724

18-
// Bring a class A with instance members into scope
25+
// Do Not Delete.
26+
// Bring a class A with instance members into scope.
1927
import "helpers/class_no_shadow.dart";
2028

29+
// Do Not Delete.
2130
// Bring an extension ExtraExt that overlaps the global and instance names
22-
// into scope
31+
// into scope.
2332
import "helpers/extension_global_instance.dart";
2433

2534
const bool extensionValue = true;

tests/language_2/extension_methods/static_extension_internal_resolution_2_test.dart

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,22 @@
1313

1414
import "package:expect/expect.dart";
1515

16-
// Bring global members into scope
16+
/////////////////////////////////////////////////////////////////////////
17+
// Note: These imports may be deliberately unused. They bring certain
18+
// names into scope, in order to test that certain resolution choices are
19+
// made even in the presence of other symbols.
20+
/////////////////////////////////////////////////////////////////////////
21+
22+
// Do Not Delete.
23+
// Bring global members into scope.
1724
import "helpers/global_scope.dart";
1825

19-
// Bring a class A with instance members into scope
26+
// Do Not Delete.
27+
// Bring a class A with instance members into scope.
2028
import "helpers/class_no_shadow.dart";
2129

22-
// Bring an extension ExtraExt with no overlapping symbols into scope
30+
// Do Not Delete.
31+
// Bring an extension ExtraExt with no overlapping symbols into scope.
2332
import "helpers/extension_only.dart";
2433

2534
const bool extensionValue = true;
@@ -107,7 +116,7 @@ extension MyExt on A {
107116
checkExtensionValue(t0);
108117
bool t1 = this.getterInGlobalScope;
109118
checkExtensionValue(t1);
110-
this.setterInGlobalScope = globalValue;
119+
this.setterInGlobalScope = extensionValue;
111120
bool t2 = this.methodInGlobalScope();
112121
checkExtensionValue(t2);
113122
}
@@ -157,7 +166,7 @@ extension MyExt on A {
157166
checkExtensionValue(t0);
158167
bool t1 = self.getterInGlobalScope;
159168
checkExtensionValue(t1);
160-
self.setterInGlobalScope = globalValue;
169+
self.setterInGlobalScope = extensionValue;
161170
bool t2 = self.methodInGlobalScope();
162171
checkExtensionValue(t2);
163172
}

tests/language_2/extension_methods/static_extension_internal_resolution_3_error_test.dart

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,23 @@
1414

1515
import "package:expect/expect.dart";
1616

17-
// Bring global members into scope
17+
/////////////////////////////////////////////////////////////////////////
18+
// Note: These imports may be deliberately unused. They bring certain
19+
// names into scope, in order to test that certain resolution choices are
20+
// made even in the presence of other symbols.
21+
/////////////////////////////////////////////////////////////////////////
22+
23+
// Do Not Delete.
24+
// Bring global members into scope.
1825
import "helpers/global_scope.dart";
1926

20-
// Bring a class A with instance members into scope
27+
// Do Not Delete.
28+
// Bring a class A with instance members into scope.
2129
import "helpers/class_no_shadow.dart";
2230

31+
// Do Not Delete.
2332
// Bring an extension ExtraExt with members that overlap the global and instance
24-
// names into scope
33+
// names into scope.
2534
import "helpers/extension_global_instance.dart";
2635

2736
const bool extensionValue = true;

tests/language_2/extension_methods/static_extension_internal_resolution_3_test.dart

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,23 @@
1414

1515
import "package:expect/expect.dart";
1616

17-
// Bring global members into scope
17+
/////////////////////////////////////////////////////////////////////////
18+
// Note: These imports may be deliberately unused. They bring certain
19+
// names into scope, in order to test that certain resolution choices are
20+
// made even in the presence of other symbols.
21+
/////////////////////////////////////////////////////////////////////////
22+
23+
// Do Not Delete.
24+
// Bring global members into scope.
1825
import "helpers/global_scope.dart";
1926

20-
// Bring a class A with instance members into scope
27+
// Do Not Delete.
28+
// Bring a class A with instance members into scope.
2129
import "helpers/class_no_shadow.dart";
2230

31+
// Do Not Delete.
2332
// Bring an extension ExtraExt with members that overlap the global and instance
24-
// names into scope
33+
// names into scope.
2534
import "helpers/extension_global_instance.dart";
2635

2736
const bool extensionValue = true;

tests/language_2/extension_methods/static_extension_internal_resolution_4_error_test.dart

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,21 @@
1515

1616
import "package:expect/expect.dart";
1717

18-
// Bring global members into scope
18+
/////////////////////////////////////////////////////////////////////////
19+
// Note: These imports may be deliberately unused. They bring certain
20+
// names into scope, in order to test that certain resolution choices are
21+
// made even in the presence of other symbols.
22+
/////////////////////////////////////////////////////////////////////////
23+
24+
// Do Not Delete.
25+
// Bring global members into scope.
1926
import "helpers/global_scope.dart";
2027

21-
// Bring a class A with instance members into scope
28+
// Do Not Delete.
29+
// Bring a class A with instance members into scope.
2230
import "helpers/class_no_shadow.dart";
2331

32+
// Do Not Delete.
2433
// Bring an extension ExtraExt with symbols that overlap the global, instance,
2534
// and extension names into scope.
2635
import "helpers/extension_all.dart";

tests/language_2/extension_methods/static_extension_internal_resolution_4_test.dart

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,21 @@
1515

1616
import "package:expect/expect.dart";
1717

18-
// Bring global members into scope
18+
/////////////////////////////////////////////////////////////////////////
19+
// Note: These imports may be deliberately unused. They bring certain
20+
// names into scope, in order to test that certain resolution choices are
21+
// made even in the presence of other symbols.
22+
/////////////////////////////////////////////////////////////////////////
23+
24+
// Do Not Delete.
25+
// Bring global members into scope.
1926
import "helpers/global_scope.dart";
2027

21-
// Bring a class A with instance members into scope
28+
// Do Not Delete.
29+
// Bring a class A with instance members into scope.
2230
import "helpers/class_no_shadow.dart";
2331

32+
// Do Not Delete.
2433
// Bring an extension ExtraExt with symbols that overlap the global, instance,
2534
// and extension names into scope.
2635
import "helpers/extension_all.dart";

tests/language_2/extension_methods/static_extension_internal_resolution_5_test.dart

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,18 @@
1313

1414
import "package:expect/expect.dart";
1515

16-
// Bring global members into scope
16+
/////////////////////////////////////////////////////////////////////////
17+
// Note: These imports may be deliberately unused. They bring certain
18+
// names into scope, in order to test that certain resolution choices are
19+
// made even in the presence of other symbols.
20+
/////////////////////////////////////////////////////////////////////////
21+
22+
// Do Not Delete.
23+
// Bring global members into scope.
1724
import "helpers/global_scope.dart";
1825

19-
// Bring a class AGlobal with instance members and global members into scope
26+
// Do Not Delete.
27+
// Bring a class AGlobal with instance members and global members into scope.
2028
import "helpers/class_shadow.dart";
2129
import "helpers/class_no_shadow.dart";
2230

tests/language_2/extension_methods/static_extension_internal_resolution_6_error_test.dart

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,18 @@
1010

1111
import "package:expect/expect.dart";
1212

13-
// Bring global members into scope
13+
/////////////////////////////////////////////////////////////////////////
14+
// Note: These imports may be deliberately unused. They bring certain
15+
// names into scope, in order to test that certain resolution choices are
16+
// made even in the presence of other symbols.
17+
/////////////////////////////////////////////////////////////////////////
18+
19+
// Do Not Delete.
20+
// Bring global members into scope.
1421
import "helpers/global_scope.dart";
1522

16-
// Bring a class AGlobal with instance members and global members into scope
23+
// Do Not Delete.
24+
// Bring a class AGlobal with instance members and global members into scope.
1725
import "helpers/class_shadow.dart";
1826

1927
extension GenericExtension<T> on T {

tests/language_2/extension_methods/static_extension_internal_resolution_6_test.dart

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,20 @@
88

99
// Test various non-error corner cases around internal resolution.
1010

11-
// Bring global members into scope
11+
import "package:expect/expect.dart";
12+
13+
/////////////////////////////////////////////////////////////////////////
14+
// Note: These imports may be deliberately unused. They bring certain
15+
// names into scope, in order to test that certain resolution choices are
16+
// made even in the presence of other symbols.
17+
/////////////////////////////////////////////////////////////////////////
18+
19+
// Do Not Delete.
20+
// Bring global members into scope.
1221
import "helpers/global_scope.dart";
1322

14-
// Bring a class AGlobal with instance members and global members into scope
23+
// Do Not Delete.
24+
// Bring a class AGlobal with instance members and global members into scope.
1525
import "helpers/class_shadow.dart";
1626

1727
extension GenericExtension<T> on T {

0 commit comments

Comments
 (0)