Fixed Issue #465: New nnbd tests added (overriding).
diff --git a/LanguageFeatures/nnbd/override_checking_A05_opted_in_lib.dart b/LanguageFeatures/nnbd/override_checking_A05_opted_in_lib.dart
new file mode 100644
index 0000000..04b9531
--- /dev/null
+++ b/LanguageFeatures/nnbd/override_checking_A05_opted_in_lib.dart
@@ -0,0 +1,32 @@
+/*
+ * 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.
+ */
+/**
+ * @author iarkh@unipro.ru
+ */
+// SharedOptions=--enable-experiment=non-nullable
+// Requirements=nnbd-strong
+
+import "dart:async";
+
+class A<T> {}
+
+class in_nullable_int      implements A<int?     > {}
+class in_nullable_Function implements A<Function?> {}
+class in_Nullable_Object   implements A<Object?  > {}
+
+class in_int      implements A<int     > {}
+class in_Function implements A<Function> {}
+class in_Object   implements A<Object  > {}
+
+class in_dynamic implements A<dynamic> {}
+class in_void    implements A<void   > {}
+class in_Null    implements A<Null   > {}
+
+class in_Never implements A<Never> {}
+
+class in_FutureOr          implements A<FutureOr>           {}
+class in_FutureOr_int      implements A<FutureOr<int>>      {}
+class in_FutureOr_FutureOr implements A<FutureOr<FutureOr>> {}
diff --git a/LanguageFeatures/nnbd/override_checking_A05_t01.dart b/LanguageFeatures/nnbd/override_checking_A05_t01.dart
new file mode 100644
index 0000000..0764352
--- /dev/null
+++ b/LanguageFeatures/nnbd/override_checking_A05_t01.dart
@@ -0,0 +1,107 @@
+/*
+ * 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.
+ */
+/**
+ * @assertion If a class [C] in a legacy library implements the same generic
+ * class [I] more than once, it is an error if the [LEGACY_ERASURE] of all such
+ * super-interfaces are not all syntactically equal. For the purposes of runtime
+ * subtyping checks, [C] is considered to implement the canonical
+ * [LEGACY_ERASURE] of the super-interfaces in question.
+ *
+ * Using the legacy erasure for checking super-interfaces accounts for opted-out
+ * classes which depend on both opted-in and opted-out versions of the same
+ * generic interface.
+ *
+ *  //opted in
+ *  class I<T> {}
+ *
+ *  // opted in
+ *  class A implements I<int?> {}
+ *
+ *  // opted out
+ *  class B implements I<int> {}
+ *
+ *  // opted out
+ *  class C extends A implements B {}
+ *
+ *  The class [C] is not considered erroneous, despite implementing both
+ *  [I<int?>] and [I<int*>], since legacy erasure makes both of those interfaces
+ *  equal. The canonical interface which [C] is chosen to implement for the
+ *  purposes of runtime type checks is [I<int*>].
+ *
+ * @description Check that error occurs if a class implements the same generic
+ * class more than once the [LEGACY_ERASURE] of all such super-interfaces are
+ * not all syntactically equal and all passes otherwise. Test [int] legacy type
+ * parameter.
+ *
+ * @author iarkh@unipro.ru
+ */
+// SharedOptions=--enable-experiment=non-nullable
+// Requirements=nnbd-strong
+// @dart=2.6
+
+import "override_checking_A05_opted_in_lib.dart";
+
+class B implements A<int> {}
+
+class B_nullable_int extends in_nullable_int implements B {}
+class B_int          extends in_int          implements B {}
+
+class B_nullable_Function extends in_nullable_Function implements B {}
+//    ^^^^^^^^^^^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class B_nullable_Object extends in_Nullable_Object implements B {}
+//    ^^^^^^^^^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class B_Function extends in_Function implements B {}
+//    ^^^^^^^^^^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class B_Object extends in_Object implements B {}
+//    ^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class B_dynamic extends in_dynamic implements B {}
+//    ^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class B_void extends in_void implements B {}
+//    ^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class B_Null extends in_Null implements B {}
+//    ^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class B_Never extends in_Never implements B {}
+//    ^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class B_FutureOr extends in_FutureOr implements B {}
+//    ^^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class B_FutureOr_int extends in_FutureOr_int implements B {}
+//    ^^^^^^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class B_FutureOr_FutureOr extends in_FutureOr_FutureOr implements B {}
+//    ^^^^^^^^^^^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+main() {}
diff --git a/LanguageFeatures/nnbd/override_checking_A05_t02.dart b/LanguageFeatures/nnbd/override_checking_A05_t02.dart
new file mode 100644
index 0000000..2599caa
--- /dev/null
+++ b/LanguageFeatures/nnbd/override_checking_A05_t02.dart
@@ -0,0 +1,107 @@
+/*
+ * 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.
+ */
+/**
+ * @assertion If a class [C] in a legacy library implements the same generic
+ * class [I] more than once, it is an error if the [LEGACY_ERASURE] of all such
+ * super-interfaces are not all syntactically equal. For the purposes of runtime
+ * subtyping checks, [C] is considered to implement the canonical
+ * [LEGACY_ERASURE] of the super-interfaces in question.
+ *
+ * Using the legacy erasure for checking super-interfaces accounts for opted-out
+ * classes which depend on both opted-in and opted-out versions of the same
+ * generic interface.
+ *
+ *  //opted in
+ *  class I<T> {}
+ *
+ *  // opted in
+ *  class A implements I<int?> {}
+ *
+ *  // opted out
+ *  class B implements I<int> {}
+ *
+ *  // opted out
+ *  class C extends A implements B {}
+ *
+ *  The class [C] is not considered erroneous, despite implementing both
+ *  [I<int?>] and [I<int*>], since legacy erasure makes both of those interfaces
+ *  equal. The canonical interface which [C] is chosen to implement for the
+ *  purposes of runtime type checks is [I<int*>].
+ *
+ * @description Check that error occurs if a class implements the same generic
+ * class more than once the [LEGACY_ERASURE] of all such super-interfaces are
+ * not all syntactically equal and all passes otherwise. Test [Function] legacy
+ * type parameter.
+ *
+ * @author iarkh@unipro.ru
+ */
+// SharedOptions=--enable-experiment=non-nullable
+// Requirements=nnbd-strong
+// @dart=2.6
+
+import "override_checking_A05_opted_in_lib.dart";
+
+class B implements A<Function> {}
+
+class B_nullable_Function extends in_nullable_Function implements B {}
+class B_Function          extends in_Function          implements B {}
+
+class B_nullable_int extends in_nullable_int implements B {}
+//    ^^^^^^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class B_nullable_Object extends in_Nullable_Object implements B {}
+//    ^^^^^^^^^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class B_int extends in_int implements B {}
+//    ^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class B_Object extends in_Object implements B {}
+//    ^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class B_dynamic extends in_dynamic implements B {}
+//    ^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class B_void extends in_void implements B {}
+//    ^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class B_Null extends in_Null implements B {}
+//    ^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class B_Never extends in_Never implements B {}
+//    ^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class B_FutureOr extends in_FutureOr implements B {}
+//    ^^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class B_FutureOr_int extends in_FutureOr_int implements B {}
+//    ^^^^^^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class B_FutureOr_FutureOr extends in_FutureOr_FutureOr implements B {}
+//    ^^^^^^^^^^^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+main() {}
diff --git a/LanguageFeatures/nnbd/override_checking_A05_t03.dart b/LanguageFeatures/nnbd/override_checking_A05_t03.dart
new file mode 100644
index 0000000..b88a58c
--- /dev/null
+++ b/LanguageFeatures/nnbd/override_checking_A05_t03.dart
@@ -0,0 +1,107 @@
+/*
+ * 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.
+ */
+/**
+ * @assertion If a class [C] in a legacy library implements the same generic
+ * class [I] more than once, it is an error if the [LEGACY_ERASURE] of all such
+ * super-interfaces are not all syntactically equal. For the purposes of runtime
+ * subtyping checks, [C] is considered to implement the canonical
+ * [LEGACY_ERASURE] of the super-interfaces in question.
+ *
+ * Using the legacy erasure for checking super-interfaces accounts for opted-out
+ * classes which depend on both opted-in and opted-out versions of the same
+ * generic interface.
+ *
+ *  //opted in
+ *  class I<T> {}
+ *
+ *  // opted in
+ *  class A implements I<int?> {}
+ *
+ *  // opted out
+ *  class B implements I<int> {}
+ *
+ *  // opted out
+ *  class C extends A implements B {}
+ *
+ *  The class [C] is not considered erroneous, despite implementing both
+ *  [I<int?>] and [I<int*>], since legacy erasure makes both of those interfaces
+ *  equal. The canonical interface which [C] is chosen to implement for the
+ *  purposes of runtime type checks is [I<int*>].
+ *
+ * @description Check that error occurs if a class implements the same generic
+ * class more than once the [LEGACY_ERASURE] of all such super-interfaces are
+ * not all syntactically equal and all passes otherwise. Test [Object] legacy
+ * type parameter.
+ *
+ * @author iarkh@unipro.ru
+ */
+// SharedOptions=--enable-experiment=non-nullable
+// Requirements=nnbd-strong
+// @dart=2.6
+
+import "override_checking_A05_opted_in_lib.dart";
+
+class B implements A<Object> {}
+
+class B_nullable_Object extends in_Nullable_Object implements B {}
+class B_Object          extends in_Object          implements B {}
+
+class B_nullable_int extends in_nullable_int implements B {}
+//    ^^^^^^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class B_nullable_Function extends in_nullable_Function implements B {}
+//    ^^^^^^^^^^^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class B_int extends in_int implements B {}
+//    ^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class B_Function extends in_Function implements B {}
+//    ^^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class B_dynamic extends in_dynamic implements B {}
+//    ^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class B_void extends in_void implements B {}
+//    ^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class B_Null extends in_Null implements B {}
+//    ^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class B_Never extends in_Never implements B {}
+//    ^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class B_FutureOr extends in_FutureOr implements B {}
+//    ^^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class B_FutureOr_int extends in_FutureOr_int implements B {}
+//    ^^^^^^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class B_FutureOr_FutureOr extends in_FutureOr_FutureOr implements B {}
+//    ^^^^^^^^^^^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+main() {}
diff --git a/LanguageFeatures/nnbd/override_checking_A05_t04.dart b/LanguageFeatures/nnbd/override_checking_A05_t04.dart
new file mode 100644
index 0000000..0c213c9
--- /dev/null
+++ b/LanguageFeatures/nnbd/override_checking_A05_t04.dart
@@ -0,0 +1,111 @@
+/*
+ * 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.
+ */
+/**
+ * @assertion If a class [C] in a legacy library implements the same generic
+ * class [I] more than once, it is an error if the [LEGACY_ERASURE] of all such
+ * super-interfaces are not all syntactically equal. For the purposes of runtime
+ * subtyping checks, [C] is considered to implement the canonical
+ * [LEGACY_ERASURE] of the super-interfaces in question.
+ *
+ * Using the legacy erasure for checking super-interfaces accounts for opted-out
+ * classes which depend on both opted-in and opted-out versions of the same
+ * generic interface.
+ *
+ *  //opted in
+ *  class I<T> {}
+ *
+ *  // opted in
+ *  class A implements I<int?> {}
+ *
+ *  // opted out
+ *  class B implements I<int> {}
+ *
+ *  // opted out
+ *  class C extends A implements B {}
+ *
+ *  The class [C] is not considered erroneous, despite implementing both
+ *  [I<int?>] and [I<int*>], since legacy erasure makes both of those interfaces
+ *  equal. The canonical interface which [C] is chosen to implement for the
+ *  purposes of runtime type checks is [I<int*>].
+ *
+ * @description Check that error occurs if a class implements the same generic
+ * class more than once the [LEGACY_ERASURE] of all such super-interfaces are
+ * not all syntactically equal and all passes otherwise. Test [dynamic] legacy
+ * type parameter.
+ *
+ * @author iarkh@unipro.ru
+ */
+// SharedOptions=--enable-experiment=non-nullable
+// Requirements=nnbd-strong
+// @dart=2.6
+
+import "override_checking_A05_opted_in_lib.dart";
+
+class B implements A<dynamic> {}
+
+class B_dynamic extends in_dynamic implements B {}
+
+class B_nullable_int extends in_nullable_int implements B {}
+//    ^^^^^^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class B_nullable_Function extends in_nullable_Function implements B {}
+//    ^^^^^^^^^^^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class B_nullable_Object extends in_Nullable_Object implements B {}
+//    ^^^^^^^^^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class B_int extends in_int implements B {}
+//    ^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class B_Function extends in_Function implements B {}
+//    ^^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class B_Object extends in_Object implements B {}
+//    ^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class B_void extends in_void implements B {}
+//    ^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class B_Null extends in_Null implements B {}
+//    ^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class B_Never extends in_Never implements B {}
+//    ^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class B_FutureOr extends in_FutureOr implements B {}
+//    ^^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class B_FutureOr_int extends in_FutureOr_int implements B {}
+//    ^^^^^^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class B_FutureOr_FutureOr extends in_FutureOr_FutureOr implements B {}
+//    ^^^^^^^^^^^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+main() {}
diff --git a/LanguageFeatures/nnbd/override_checking_A05_t05.dart b/LanguageFeatures/nnbd/override_checking_A05_t05.dart
new file mode 100644
index 0000000..f5fb6c6
--- /dev/null
+++ b/LanguageFeatures/nnbd/override_checking_A05_t05.dart
@@ -0,0 +1,111 @@
+/*
+ * 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.
+ */
+/**
+ * @assertion If a class [C] in a legacy library implements the same generic
+ * class [I] more than once, it is an error if the [LEGACY_ERASURE] of all such
+ * super-interfaces are not all syntactically equal. For the purposes of runtime
+ * subtyping checks, [C] is considered to implement the canonical
+ * [LEGACY_ERASURE] of the super-interfaces in question.
+ *
+ * Using the legacy erasure for checking super-interfaces accounts for opted-out
+ * classes which depend on both opted-in and opted-out versions of the same
+ * generic interface.
+ *
+ *  //opted in
+ *  class I<T> {}
+ *
+ *  // opted in
+ *  class A implements I<int?> {}
+ *
+ *  // opted out
+ *  class B implements I<int> {}
+ *
+ *  // opted out
+ *  class C extends A implements B {}
+ *
+ *  The class [C] is not considered erroneous, despite implementing both
+ *  [I<int?>] and [I<int*>], since legacy erasure makes both of those interfaces
+ *  equal. The canonical interface which [C] is chosen to implement for the
+ *  purposes of runtime type checks is [I<int*>].
+ *
+ * @description Check that error occurs if a class implements the same generic
+ * class more than once the [LEGACY_ERASURE] of all such super-interfaces are
+ * not all syntactically equal and all passes otherwise. Test [void] legacy
+ * type parameter.
+ *
+ * @author iarkh@unipro.ru
+ */
+// SharedOptions=--enable-experiment=non-nullable
+// Requirements=nnbd-strong
+// @dart=2.6
+
+import "override_checking_A05_opted_in_lib.dart";
+
+class B implements A<void> {}
+
+class B_void extends in_void implements B {}
+
+class B_nullable_int extends in_nullable_int implements B {}
+//    ^^^^^^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class B_nullable_Function extends in_nullable_Function implements B {}
+//    ^^^^^^^^^^^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class B_nullable_Object extends in_Nullable_Object implements B {}
+//    ^^^^^^^^^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class B_int extends in_int implements B {}
+//    ^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class B_Function extends in_Function implements B {}
+//    ^^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class B_Object extends in_Object implements B {}
+//    ^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class B_dynamic extends in_dynamic implements B {}
+//    ^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class B_Null extends in_Null implements B {}
+//    ^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class B_Never extends in_Never implements B {}
+//    ^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class B_FutureOr extends in_FutureOr implements B {}
+//    ^^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class B_FutureOr_int extends in_FutureOr_int implements B {}
+//    ^^^^^^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class B_FutureOr_FutureOr extends in_FutureOr_FutureOr implements B {}
+//    ^^^^^^^^^^^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+main() {}
diff --git a/LanguageFeatures/nnbd/override_checking_A05_t06.dart b/LanguageFeatures/nnbd/override_checking_A05_t06.dart
new file mode 100644
index 0000000..acc6a0a
--- /dev/null
+++ b/LanguageFeatures/nnbd/override_checking_A05_t06.dart
@@ -0,0 +1,105 @@
+/*
+ * 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.
+ */
+/**
+ * @assertion If a class [C] in a legacy library implements the same generic
+ * class [I] more than once, it is an error if the [LEGACY_ERASURE] of all such
+ * super-interfaces are not all syntactically equal. For the purposes of runtime
+ * subtyping checks, [C] is considered to implement the canonical
+ * [LEGACY_ERASURE] of the super-interfaces in question.
+ *
+ * Using the legacy erasure for checking super-interfaces accounts for opted-out
+ * classes which depend on both opted-in and opted-out versions of the same
+ * generic interface.
+ *
+ *  //opted in
+ *  class I<T> {}
+ *
+ *  // opted in
+ *  class A implements I<int?> {}
+ *
+ *  // opted out
+ *  class B implements I<int> {}
+ *
+ *  // opted out
+ *  class C extends A implements B {}
+ *
+ *  The class [C] is not considered erroneous, despite implementing both
+ *  [I<int?>] and [I<int*>], since legacy erasure makes both of those interfaces
+ *  equal. The canonical interface which [C] is chosen to implement for the
+ *  purposes of runtime type checks is [I<int*>].
+ *
+ * @description Check that error occurs if a class implements the same generic
+ * class more than once the [LEGACY_ERASURE] of all such super-interfaces are
+ * not all syntactically equal and all passes otherwise. Test [Null] legacy
+ * type parameter.
+ *
+ * @author iarkh@unipro.ru
+ */
+// SharedOptions=--enable-experiment=non-nullable
+// Requirements=nnbd-strong
+// @dart=2.6
+
+import "override_checking_A05_opted_in_lib.dart";
+
+class B implements A<Null> {}
+class B_Never extends in_Never implements B {}
+
+class B_nullable_int extends in_nullable_int implements B {}
+//    ^^^^^^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class B_nullable_Function extends in_nullable_Function implements B {}
+//    ^^^^^^^^^^^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class B_nullable_Object extends in_Nullable_Object implements B {}
+//    ^^^^^^^^^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class B_int extends in_int implements B {}
+//    ^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class B_Function extends in_Function implements B {}
+//    ^^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class B_Object extends in_Object implements B {}
+//    ^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class B_void extends in_void implements B {}
+//    ^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class B_dynamic extends in_dynamic implements B {}
+//    ^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class B_FutureOr extends in_FutureOr implements B {}
+//    ^^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class B_FutureOr_int extends in_FutureOr_int implements B {}
+//    ^^^^^^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class B_FutureOr_FutureOr extends in_FutureOr_FutureOr implements B {}
+//    ^^^^^^^^^^^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+main() {}
diff --git a/LanguageFeatures/nnbd/override_checking_A05_t07.dart b/LanguageFeatures/nnbd/override_checking_A05_t07.dart
new file mode 100644
index 0000000..276fa2c
--- /dev/null
+++ b/LanguageFeatures/nnbd/override_checking_A05_t07.dart
@@ -0,0 +1,112 @@
+/*
+ * 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.
+ */
+/**
+ * @assertion If a class [C] in a legacy library implements the same generic
+ * class [I] more than once, it is an error if the [LEGACY_ERASURE] of all such
+ * super-interfaces are not all syntactically equal. For the purposes of runtime
+ * subtyping checks, [C] is considered to implement the canonical
+ * [LEGACY_ERASURE] of the super-interfaces in question.
+ *
+ * Using the legacy erasure for checking super-interfaces accounts for opted-out
+ * classes which depend on both opted-in and opted-out versions of the same
+ * generic interface.
+ *
+ *  //opted in
+ *  class I<T> {}
+ *
+ *  // opted in
+ *  class A implements I<int?> {}
+ *
+ *  // opted out
+ *  class B implements I<int> {}
+ *
+ *  // opted out
+ *  class C extends A implements B {}
+ *
+ *  The class [C] is not considered erroneous, despite implementing both
+ *  [I<int?>] and [I<int*>], since legacy erasure makes both of those interfaces
+ *  equal. The canonical interface which [C] is chosen to implement for the
+ *  purposes of runtime type checks is [I<int*>].
+ *
+ * @description Check that error occurs if a class implements the same generic
+ * class more than once the [LEGACY_ERASURE] of all such super-interfaces are
+ * not all syntactically equal and all passes otherwise. Test [FutureOr] legacy
+ * type parameter.
+ *
+ * @author iarkh@unipro.ru
+ */
+// SharedOptions=--enable-experiment=non-nullable
+// Requirements=nnbd-strong
+// @dart=2.6
+
+import "dart:async";
+import "override_checking_A05_opted_in_lib.dart";
+
+class B implements A<FutureOr> {}
+
+class B_FutureOr extends in_FutureOr implements B {}
+
+class B_nullable_int extends in_nullable_int implements B {}
+//    ^^^^^^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class B_nullable_Function extends in_nullable_Function implements B {}
+//    ^^^^^^^^^^^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class B_nullable_Object extends in_Nullable_Object implements B {}
+//    ^^^^^^^^^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class B_int extends in_int implements B {}
+//    ^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class B_Function extends in_Function implements B {}
+//    ^^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class B_Object extends in_Object implements B {}
+//    ^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class B_dynamic extends in_dynamic implements B {}
+//    ^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class B_void extends in_void implements B {}
+//    ^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class B_Null extends in_Null implements B {}
+//    ^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class B_Never extends in_Never implements B {}
+//    ^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class B_FutureOr_int extends in_FutureOr_int implements B {}
+//    ^^^^^^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class B_FutureOr_FutureOr extends in_FutureOr_FutureOr implements B {}
+//    ^^^^^^^^^^^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+main() {}
diff --git a/LanguageFeatures/nnbd/override_checking_A05_t08.dart b/LanguageFeatures/nnbd/override_checking_A05_t08.dart
new file mode 100644
index 0000000..32c8dc5
--- /dev/null
+++ b/LanguageFeatures/nnbd/override_checking_A05_t08.dart
@@ -0,0 +1,112 @@
+/*
+ * 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.
+ */
+/**
+ * @assertion If a class [C] in a legacy library implements the same generic
+ * class [I] more than once, it is an error if the [LEGACY_ERASURE] of all such
+ * super-interfaces are not all syntactically equal. For the purposes of runtime
+ * subtyping checks, [C] is considered to implement the canonical
+ * [LEGACY_ERASURE] of the super-interfaces in question.
+ *
+ * Using the legacy erasure for checking super-interfaces accounts for opted-out
+ * classes which depend on both opted-in and opted-out versions of the same
+ * generic interface.
+ *
+ *  //opted in
+ *  class I<T> {}
+ *
+ *  // opted in
+ *  class A implements I<int?> {}
+ *
+ *  // opted out
+ *  class B implements I<int> {}
+ *
+ *  // opted out
+ *  class C extends A implements B {}
+ *
+ *  The class [C] is not considered erroneous, despite implementing both
+ *  [I<int?>] and [I<int*>], since legacy erasure makes both of those interfaces
+ *  equal. The canonical interface which [C] is chosen to implement for the
+ *  purposes of runtime type checks is [I<int*>].
+ *
+ * @description Check that error occurs if a class implements the same generic
+ * class more than once the [LEGACY_ERASURE] of all such super-interfaces are
+ * not all syntactically equal and all passes otherwise. Test [FutureOr<int>]
+ * legacy type parameter.
+ *
+ * @author iarkh@unipro.ru
+ */
+// SharedOptions=--enable-experiment=non-nullable
+// Requirements=nnbd-strong
+// @dart=2.6
+
+import "dart:async";
+import "override_checking_A05_opted_in_lib.dart";
+
+class B implements A<FutureOr<int>> {}
+
+class B_FutureOr_int extends in_FutureOr_int implements B {}
+
+class B_nullable_int extends in_nullable_int implements B {}
+//    ^^^^^^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class B_nullable_Function extends in_nullable_Function implements B {}
+//    ^^^^^^^^^^^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class B_nullable_Object extends in_Nullable_Object implements B {}
+//    ^^^^^^^^^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class B_int extends in_int implements B {}
+//    ^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class B_Function extends in_Function implements B {}
+//    ^^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class B_Object extends in_Object implements B {}
+//    ^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class B_dynamic extends in_dynamic implements B {}
+//    ^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class B_void extends in_void implements B {}
+//    ^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class B_Null extends in_Null implements B {}
+//    ^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class B_Never extends in_Never implements B {}
+//    ^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class B_FutureOr extends in_FutureOr implements B {}
+//    ^^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class B_FutureOr_FutureOr extends in_FutureOr_FutureOr implements B {}
+//    ^^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+main() {}
diff --git a/LanguageFeatures/nnbd/override_checking_A05_t09.dart b/LanguageFeatures/nnbd/override_checking_A05_t09.dart
new file mode 100644
index 0000000..928280b
--- /dev/null
+++ b/LanguageFeatures/nnbd/override_checking_A05_t09.dart
@@ -0,0 +1,112 @@
+/*
+ * 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.
+ */
+/**
+ * @assertion If a class [C] in a legacy library implements the same generic
+ * class [I] more than once, it is an error if the [LEGACY_ERASURE] of all such
+ * super-interfaces are not all syntactically equal. For the purposes of runtime
+ * subtyping checks, [C] is considered to implement the canonical
+ * [LEGACY_ERASURE] of the super-interfaces in question.
+ *
+ * Using the legacy erasure for checking super-interfaces accounts for opted-out
+ * classes which depend on both opted-in and opted-out versions of the same
+ * generic interface.
+ *
+ *  //opted in
+ *  class I<T> {}
+ *
+ *  // opted in
+ *  class A implements I<int?> {}
+ *
+ *  // opted out
+ *  class B implements I<int> {}
+ *
+ *  // opted out
+ *  class C extends A implements B {}
+ *
+ *  The class [C] is not considered erroneous, despite implementing both
+ *  [I<int?>] and [I<int*>], since legacy erasure makes both of those interfaces
+ *  equal. The canonical interface which [C] is chosen to implement for the
+ *  purposes of runtime type checks is [I<int*>].
+ *
+ * @description Check that error occurs if a class implements the same generic
+ * class more than once the [LEGACY_ERASURE] of all such super-interfaces are
+ * not all syntactically equal and all passes otherwise. Test
+ * [FutureOr<FutureOr>] legacy type parameter.
+ *
+ * @author iarkh@unipro.ru
+ */
+// SharedOptions=--enable-experiment=non-nullable
+// Requirements=nnbd-strong
+// @dart=2.6
+
+import "dart:async";
+import "override_checking_A05_opted_in_lib.dart";
+
+class B implements A<FutureOr<FutureOr>> {}
+
+class B_FutureOr_FutureOr extends in_FutureOr_FutureOr implements B {}
+
+class B_nullable_int extends in_nullable_int implements B {}
+//    ^^^^^^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class B_nullable_Function extends in_nullable_Function implements B {}
+//    ^^^^^^^^^^^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class B_nullable_Object extends in_Nullable_Object implements B {}
+//    ^^^^^^^^^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class B_int extends in_int implements B {}
+//    ^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class B_Function extends in_Function implements B {}
+//    ^^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class B_Object extends in_Object implements B {}
+//    ^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class B_dynamic extends in_dynamic implements B {}
+//    ^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class B_void extends in_void implements B {}
+//    ^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class B_Null extends in_Null implements B {}
+//    ^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class B_Never extends in_Never implements B {}
+//    ^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class B_FutureOr_int extends in_FutureOr_int implements B {}
+//    ^^^^^^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class B_FutureOr extends in_FutureOr implements B {}
+//    ^^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+main() {}