Fixed Issue #465: new tests added.
diff --git a/LanguageFeatures/nnbd/override_checking_A06_opted_out_lib.dart b/LanguageFeatures/nnbd/override_checking_A06_opted_out_lib.dart
index 57b5e63..7a3dd1f 100644
--- a/LanguageFeatures/nnbd/override_checking_A06_opted_out_lib.dart
+++ b/LanguageFeatures/nnbd/override_checking_A06_opted_out_lib.dart
@@ -25,3 +25,20 @@
 class out_FutureOr          extends A<FutureOr>           {}
 class out_FutureOr_int      extends A<FutureOr<int>>      {}
 class out_FutureOr_FutureOr extends A<FutureOr<FutureOr>> {}
+
+class out_Never extends A<Never> {}
+
+
+class out_int1      extends A<int     > {}
+class out_Function1 extends A<Function> {}
+class out_Object1   extends A<Object  > {}
+
+class out_dynamic1 extends A<dynamic> {}
+class out_void1    extends A<void   > {}
+class out_Null1    extends A<Null   > {}
+
+class out_FutureOr1          extends A<FutureOr>           {}
+class out_FutureOr_int1      extends A<FutureOr<int>>      {}
+class out_FutureOr_FutureOr1 extends A<FutureOr<FutureOr>> {}
+
+class out_Never1 extends A<Never> {}
diff --git a/LanguageFeatures/nnbd/override_checking_A06_t114.dart b/LanguageFeatures/nnbd/override_checking_A06_t114.dart
new file mode 100644
index 0000000..5af7099
--- /dev/null
+++ b/LanguageFeatures/nnbd/override_checking_A06_t114.dart
@@ -0,0 +1,48 @@
+/*
+ * 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 an opted-in library implements the same generic
+ * class [I] more than once as [I0], .., [In], and at least one of the [Ii] is
+ * not syntactically equal to the others, then it is an error if
+ * [NNBD_TOP_MERGE(S0, ..., Sn)] is not defined where [Si] is [NORM(Ii)].
+ * Otherwise, for the purposes of runtime subtyping checks, [C] is considered to
+ * implement the canonical interface given by [NNBD_TOP_MERGE(S0, ..., Sn)].
+ *
+ * @description Check that error occurs as a result of [NNBD_TOP_MERGE] of
+ * [Never*] vs [Object], [Object?].
+ * parameter.
+ *
+ * @author iarkh@unipro.ru
+ */
+// SharedOptions=--enable-experiment=non-nullable
+// Requirements=nnbd-strong
+
+import "override_checking_A06_opted_out_lib.dart";
+
+class B extends A<Object> {}
+class C extends A<Object?> {}
+
+class D1 extends out_Never implements B {}
+//    ^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class D2 extends out_Never implements C {}
+//    ^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class D3 extends B implements out_Never {}
+//    ^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+class D4 extends C implements out_Never {}
+//    ^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+main() {}
diff --git a/LanguageFeatures/nnbd/override_checking_A06_t115.dart b/LanguageFeatures/nnbd/override_checking_A06_t115.dart
new file mode 100644
index 0000000..44e210d
--- /dev/null
+++ b/LanguageFeatures/nnbd/override_checking_A06_t115.dart
@@ -0,0 +1,37 @@
+/*
+ * 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 an opted-in library implements the same generic
+ * class [I] more than once as [I0], .., [In], and at least one of the [Ii] is
+ * not syntactically equal to the others, then it is an error if
+ * [NNBD_TOP_MERGE(S0, ..., Sn)] is not defined where [Si] is [NORM(Ii)].
+ * Otherwise, for the purposes of runtime subtyping checks, [C] is considered to
+ * implement the canonical interface given by [NNBD_TOP_MERGE(S0, ..., Sn)].
+ *
+ * @description Check that result of [NNBD_TOP_MERGE] for the cases:
+ *   NNBD_TOP_MERGE(int*, int*) = int?
+ *   NNBD_TOP_MERGE(Function*, Function*) = Function?
+ *   NNBD_TOP_MERGE(Object*, Object*) = Object?
+ *
+ * @Issue 40524
+ * @author iarkh@unipro.ru
+ */
+// SharedOptions=--enable-experiment=non-nullable
+// Requirements=nnbd-strong
+
+import "../../Utils/expect.dart";
+import "override_checking_A06_opted_out_lib.dart";
+
+class in_int      extends out_int      implements out_int1      {}
+class in_Function extends out_Function implements out_Function1 {}
+class in_Object   extends out_Object   implements out_Object1   {}
+
+
+main() {
+  Expect.equals(typeOf<int?     >(), in_int()     .getType());
+  Expect.equals(typeOf<Function?>(), in_Function().getType());
+  Expect.equals(typeOf<Object?  >(), in_Object()  .getType());
+}
diff --git a/LanguageFeatures/nnbd/override_checking_A06_t116.dart b/LanguageFeatures/nnbd/override_checking_A06_t116.dart
new file mode 100644
index 0000000..4b05a26
--- /dev/null
+++ b/LanguageFeatures/nnbd/override_checking_A06_t116.dart
@@ -0,0 +1,36 @@
+/*
+ * 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 an opted-in library implements the same generic
+ * class [I] more than once as [I0], .., [In], and at least one of the [Ii] is
+ * not syntactically equal to the others, then it is an error if
+ * [NNBD_TOP_MERGE(S0, ..., Sn)] is not defined where [Si] is [NORM(Ii)].
+ * Otherwise, for the purposes of runtime subtyping checks, [C] is considered to
+ * implement the canonical interface given by [NNBD_TOP_MERGE(S0, ..., Sn)].
+ *
+ * @description Check that result of [NNBD_TOP_MERGE] for the cases:
+ *   NNBD_TOP_MERGE(dynamic*, dynamic*) = dynamic
+ *   NNBD_TOP_MERGE(void*, void*) = void
+ *   NNBD_TOP_MERGE(Null*, Null*) = Null
+ *
+ * @author iarkh@unipro.ru
+ */
+// SharedOptions=--enable-experiment=non-nullable
+// Requirements=nnbd-strong
+
+import "../../Utils/expect.dart";
+import "override_checking_A06_opted_out_lib.dart";
+
+class in_dynamic extends out_dynamic implements out_dynamic1 {}
+class in_void    extends out_void    implements out_void1    {}
+class in_Null    extends out_Null    implements out_Null1    {}
+
+
+main() {
+  Expect.equals(typeOf<dynamic>(), in_dynamic().getType());
+  Expect.equals(typeOf<void   >(), in_void   ().getType());
+  Expect.equals(typeOf<Null   >(), in_Null   ().getType());
+}
diff --git a/LanguageFeatures/nnbd/override_checking_A06_t117.dart b/LanguageFeatures/nnbd/override_checking_A06_t117.dart
new file mode 100644
index 0000000..2bdc80f
--- /dev/null
+++ b/LanguageFeatures/nnbd/override_checking_A06_t117.dart
@@ -0,0 +1,35 @@
+/*
+ * 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 an opted-in library implements the same generic
+ * class [I] more than once as [I0], .., [In], and at least one of the [Ii] is
+ * not syntactically equal to the others, then it is an error if
+ * [NNBD_TOP_MERGE(S0, ..., Sn)] is not defined where [Si] is [NORM(Ii)].
+ * Otherwise, for the purposes of runtime subtyping checks, [C] is considered to
+ * implement the canonical interface given by [NNBD_TOP_MERGE(S0, ..., Sn)].
+ *
+ * @description Check that result of [NNBD_TOP_MERGE] for the following cases:
+ *   NNBD_TOP_MERGE(FutureOr*, FutureOr*) = FutureOr
+ *   NNBD_TOP_MERGE(FutureOr<int>>*, FutureOr<int>>) = FutureOr<int?>
+ *   NNBD_TOP_MERGE<FutureOr<FutureOr>>*, FutureOr<FutureOr>>*) = FutureOr<FutureOr>
+ * @author iarkh@unipro.ru
+ */
+// SharedOptions=--enable-experiment=non-nullable
+// Requirements=nnbd-strong
+
+import "dart:async";
+import "../../Utils/expect.dart";
+import "override_checking_A06_opted_out_lib.dart";
+
+class C1 extends out_FutureOr          implements out_FutureOr1          {}
+class C2 extends out_FutureOr_int      implements out_FutureOr_int1      {}
+class C3 extends out_FutureOr_FutureOr implements out_FutureOr_FutureOr1 {}
+
+main() {
+  Expect.equals(typeOf<FutureOr>(),           C1().getType());
+  Expect.equals(typeOf<FutureOr<int>>(),      C2().getType());
+  Expect.equals(typeOf<FutureOr<FutureOr>>(), C3().getType());
+}
diff --git a/LanguageFeatures/nnbd/override_checking_A06_t118.dart b/LanguageFeatures/nnbd/override_checking_A06_t118.dart
new file mode 100644
index 0000000..6794283
--- /dev/null
+++ b/LanguageFeatures/nnbd/override_checking_A06_t118.dart
@@ -0,0 +1,27 @@
+/*
+ * 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 an opted-in library implements the same generic
+ * class [I] more than once as [I0], .., [In], and at least one of the [Ii] is
+ * not syntactically equal to the others, then it is an error if
+ * [NNBD_TOP_MERGE(S0, ..., Sn)] is not defined where [Si] is [NORM(Ii)].
+ * Otherwise, for the purposes of runtime subtyping checks, [C] is considered to
+ * implement the canonical interface given by [NNBD_TOP_MERGE(S0, ..., Sn)].
+ *
+ * @description Check that result of [NNBD_TOP_MERGE(Never*, Never*)] is [Never]
+ * @author iarkh@unipro.ru
+ */
+// SharedOptions=--enable-experiment=non-nullable
+// Requirements=nnbd-strong
+
+import "../../Utils/expect.dart";
+import "override_checking_A06_opted_out_lib.dart";
+
+class C extends out_Never implements out_Never1 {}
+
+main() {
+  Expect.equals(typeOf<Never>(), C().getType());
+}
diff --git a/LanguageFeatures/nnbd/override_checking_A06_t119.dart b/LanguageFeatures/nnbd/override_checking_A06_t119.dart
new file mode 100644
index 0000000..c3c1bc5
--- /dev/null
+++ b/LanguageFeatures/nnbd/override_checking_A06_t119.dart
@@ -0,0 +1,36 @@
+/*
+ * 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 an opted-in library implements the same generic
+ * class [I] more than once as [I0], .., [In], and at least one of the [Ii] is
+ * not syntactically equal to the others, then it is an error if
+ * [NNBD_TOP_MERGE(S0, ..., Sn)] is not defined where [Si] is [NORM(Ii)].
+ * Otherwise, for the purposes of runtime subtyping checks, [C] is considered to
+ * implement the canonical interface given by [NNBD_TOP_MERGE(S0, ..., Sn)].
+ *
+ * @description Check that that the result of NNBD_TOP_MERGE(Never, Never)] is
+ * [Never].
+ *
+ * @Issue 40554
+ * @author iarkh@unipro.ru
+ */
+// SharedOptions=--enable-experiment=non-nullable
+// Requirements=nnbd-strong
+
+import "../../Utils/expect.dart";
+
+class A<T> {
+  void test() { Expect.equals(Never, T); }
+}
+
+class B extends A<Never> {}
+class C extends A<Never> {}
+
+class D extends B implements C {}
+
+void main() {
+  D().test();
+}