[dart2js] Add regression test for 43055.

Change-Id: Ia83ada924f63ae7d8dfbe034415e5fd8f241cd2e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158680
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
diff --git a/pkg/compiler/test/deferred_loading/data/regress_43055/libb.dart b/pkg/compiler/test/deferred_loading/data/regress_43055/libb.dart
new file mode 100644
index 0000000..1d38a5c
--- /dev/null
+++ b/pkg/compiler/test/deferred_loading/data/regress_43055/libb.dart
@@ -0,0 +1,11 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// @dart = 2.7
+
+import 'libc.dart';
+
+/*class: C1:OutputUnit(1, {libb})*/
+/*member: C1.:OutputUnit(1, {libb})*/
+class C1 extends C2 implements C3 {}
diff --git a/pkg/compiler/test/deferred_loading/data/regress_43055/libc.dart b/pkg/compiler/test/deferred_loading/data/regress_43055/libc.dart
new file mode 100644
index 0000000..6133cf2
--- /dev/null
+++ b/pkg/compiler/test/deferred_loading/data/regress_43055/libc.dart
@@ -0,0 +1,12 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// @dart = 2.7
+
+/*class: C2:OutputUnit(main, {})*/
+/*member: C2.:OutputUnit(1, {libb})*/
+class C2 {}
+
+/*class: C3:OutputUnit(main, {})*/
+class C3 {}
diff --git a/pkg/compiler/test/deferred_loading/data/regress_43055/main.dart b/pkg/compiler/test/deferred_loading/data/regress_43055/main.dart
new file mode 100644
index 0000000..f916de5
--- /dev/null
+++ b/pkg/compiler/test/deferred_loading/data/regress_43055/main.dart
@@ -0,0 +1,15 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// @dart = 2.7
+import 'libb.dart' deferred as libb;
+import 'libc.dart';
+
+/*member: main:OutputUnit(main, {})*/
+main() async {
+  var f = /*OutputUnit(main, {})*/ () => libb.C1();
+  print(f is C2 Function());
+  print(f is C3 Function());
+  await libb.loadLibrary();
+}
diff --git a/tests/dart2js/deferred/regress_43055/libb.dart b/tests/dart2js/deferred/regress_43055/libb.dart
new file mode 100644
index 0000000..46feca2
--- /dev/null
+++ b/tests/dart2js/deferred/regress_43055/libb.dart
@@ -0,0 +1,7 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'libc.dart';
+
+class C1 extends C2 implements C3 {}
diff --git a/tests/dart2js/deferred/regress_43055/libc.dart b/tests/dart2js/deferred/regress_43055/libc.dart
new file mode 100644
index 0000000..c5952f0
--- /dev/null
+++ b/tests/dart2js/deferred/regress_43055/libc.dart
@@ -0,0 +1,7 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+class C2 {}
+
+class C3 {}
diff --git a/tests/dart2js/deferred/regress_43055/regress_43055_test.dart b/tests/dart2js/deferred/regress_43055/regress_43055_test.dart
new file mode 100644
index 0000000..54fb197
--- /dev/null
+++ b/tests/dart2js/deferred/regress_43055/regress_43055_test.dart
@@ -0,0 +1,14 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:expect/expect.dart';
+import 'libb.dart' deferred as libb;
+import 'libc.dart';
+
+main() async {
+  var f = () => libb.C1();
+  Expect.isTrue(f is C2 Function());
+  Expect.isTrue(f is C3 Function());
+  await libb.loadLibrary();
+}