Migration: add failing test to repro issue #49689

Bug: https://github.com/dart-lang/sdk/issues/49689
Change-Id: I00aaca8160b2bcd3de02eeb31ecc3efd6ec4a84c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/255545
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
diff --git a/pkg/nnbd_migration/test/api_test.dart b/pkg/nnbd_migration/test/api_test.dart
index 84172ab..3be6a6c 100644
--- a/pkg/nnbd_migration/test/api_test.dart
+++ b/pkg/nnbd_migration/test/api_test.dart
@@ -5393,6 +5393,41 @@
     await _checkSingleFileChanges(content, expected);
   }
 
+  @FailingTest(issue: 'https://github.com/dart-lang/sdk/issues/49689')
+  Future<void> test_infer_late_with_cascaded_usage() async {
+    var content = '''
+class A {
+  B b;
+}
+class B {
+  void f() {}
+  void g() {}
+}
+foo(A a) {
+  a.b..f()..g();
+}
+bar(A a) {
+  a.b = B();
+}
+''';
+    var expected = '''
+class A {
+  late B b;
+}
+class B {
+  void f() {}
+  void g() {}
+}
+foo(A a) {
+  a.b..f()..g();
+}
+bar(A a) {
+  a.b = B();
+}
+''';
+    await _checkSingleFileChanges(content, expected);
+  }
+
   @FailingTest(issue: 'https://github.com/dart-lang/sdk/issues/39376')
   Future<void> test_infer_required() async {
     var content = '''