Skip to content

Commit e6bfae0

Browse files
pqcommit-bot@chromium.org
authored andcommitted
test case for potential overlap in convert_to_null_aware_test
Change-Id: I54a002fc60328eea13e14a57785298f4907e22c3 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161460 Reviewed-by: Brian Wilkerson <[email protected]> Commit-Queue: Phil Quitslund <[email protected]>
1 parent 23f80fb commit e6bfae0

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

pkg/analysis_server/test/src/services/correction/fix/bulk/convert_to_null_aware_test.dart

+6-8
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,16 @@ class ConvertToNullAwareTest extends BulkFixProcessorTest {
2020

2121
Future<void> test_singleFile() async {
2222
await resolveTestUnit('''
23-
abstract class A {
24-
int m();
23+
class A {
24+
int m(int p) => p;
2525
}
26-
int f(A a) => null == a ? null : a.m();
27-
int g(A a) => a == null ? null : a.m();
26+
int f(A x, A y) => x == null ? null : x.m(y == null ? null : y.m(0));
2827
''');
2928
await assertHasFix('''
30-
abstract class A {
31-
int m();
29+
class A {
30+
int m(int p) => p;
3231
}
33-
int f(A a) => a?.m();
34-
int g(A a) => a?.m();
32+
int f(A x, A y) => x?.m(y?.m(0));
3533
''');
3634
}
3735
}

0 commit comments

Comments
 (0)