Fixed Issue #465: Overriding tests updated.
diff --git a/LanguageFeatures/nnbd/override_checking_A03_opted_in_lib.dart b/LanguageFeatures/nnbd/override_checking_A03_opted_in_lib.dart
index e7e14b2..c52b9fc 100644
--- a/LanguageFeatures/nnbd/override_checking_A03_opted_in_lib.dart
+++ b/LanguageFeatures/nnbd/override_checking_A03_opted_in_lib.dart
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+ * 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.
  */
diff --git a/LanguageFeatures/nnbd/override_checking_A03_opted_out_lib.dart b/LanguageFeatures/nnbd/override_checking_A03_opted_out_lib.dart
index ee9f605..038c6c0 100644
--- a/LanguageFeatures/nnbd/override_checking_A03_opted_out_lib.dart
+++ b/LanguageFeatures/nnbd/override_checking_A03_opted_out_lib.dart
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+ * 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.
  */
diff --git a/LanguageFeatures/nnbd/override_checking_A03_t01.dart b/LanguageFeatures/nnbd/override_checking_A03_t01.dart
index 2590bd9..a90da64 100644
--- a/LanguageFeatures/nnbd/override_checking_A03_t01.dart
+++ b/LanguageFeatures/nnbd/override_checking_A03_t01.dart
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+ * 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.
  */
diff --git a/LanguageFeatures/nnbd/override_checking_A03_t02.dart b/LanguageFeatures/nnbd/override_checking_A03_t02.dart
index df0f977..6762806 100644
--- a/LanguageFeatures/nnbd/override_checking_A03_t02.dart
+++ b/LanguageFeatures/nnbd/override_checking_A03_t02.dart
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+ * 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.
  */
@@ -21,11 +21,9 @@
  * classes because opted out libraries may bring together otherwise incompatible
  * member signatures without causing an error.
  *
- * @description Check that legacy class can inherit the same method with
- * parameter from two opted in classes with contradictory nullability
- * information.
+ * @description Check that legacy class can inherit the same field from two
+ * opted in classes with contradictory nullability information.
  *
- * Issue 40414
  * @author iarkh@unipro.ru
  */
 // SharedOptions=--enable-experiment=non-nullable
@@ -34,15 +32,17 @@
 import "../../Utils/expect.dart";
 import "override_checking_A03_opted_out_lib.dart";
 
-class A extends LEGACY_ARGS_2 {
-  void test_int     (int?      i) { Expect.isNull(i); }
-  void test_object  (Object?   o) { Expect.isNull(o); }
-  void test_function(Function? f) { Expect.isNull(f); }
-}
-
 main() {
-  A a = A();
-  a.test_int     (null);
-  a.test_object  (null);
-  a.test_function(null);
+  LEGACY_FIELDS_1 x1 = LEGACY_FIELDS_1();
+  Expect.isNull(x1.i);
+  Expect.isNull(x1.o);
+  Expect.isNull(x1.f);
+
+  LEGACY_FIELDS_2 x2 = LEGACY_FIELDS_2();
+  x2.i = null;
+  Expect.isNull(x2.i);
+  x2.o = null;
+  Expect.isNull(x2.o);
+  x2.f = null;
+  Expect.isNull(x2.f);
 }
diff --git a/LanguageFeatures/nnbd/override_checking_A03_t03.dart b/LanguageFeatures/nnbd/override_checking_A03_t03.dart
index de40880..f35a41a 100644
--- a/LanguageFeatures/nnbd/override_checking_A03_t03.dart
+++ b/LanguageFeatures/nnbd/override_checking_A03_t03.dart
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+ * 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.
  */
@@ -21,7 +21,7 @@
  * classes because opted out libraries may bring together otherwise incompatible
  * member signatures without causing an error.
  *
- * @description Check that legacy class can inherit the same field from two
+ * @description Check that legacy class can inherit the same getter from two
  * opted in classes with contradictory nullability information.
  *
  * @author iarkh@unipro.ru
@@ -31,18 +31,16 @@
 
 import "../../Utils/expect.dart";
 import "override_checking_A03_opted_out_lib.dart";
+import "override_checking_A03_opted_in_lib.dart";
 
 main() {
-  LEGACY_FIELDS_1 x1 = LEGACY_FIELDS_1();
-  Expect.isNull(x1.i);
-  Expect.isNull(x1.o);
-  Expect.isNull(x1.f);
+  LEGACY_GETTER_1 x1 = LEGACY_GETTER_1();
+  Expect.isNull(x1.getInt);
+  Expect.isNull(x1.getObject);
+  Expect.isNull(x1.getFunction);
 
-  LEGACY_FIELDS_2 x2 = LEGACY_FIELDS_2();
-  x2.i = null;
-  Expect.isNull(x2.i);
-  x2.o = null;
-  Expect.isNull(x2.o);
-  x2.f = null;
-  Expect.isNull(x2.f);
+  LEGACY_GETTER_2 x2 = LEGACY_GETTER_2();
+  Expect.equals(1, x2.getInt);
+  Expect.equals(1, x2.getObject);
+  Expect.equals(testme, x2.getFunction);
 }
diff --git a/LanguageFeatures/nnbd/override_checking_A03_t04.dart b/LanguageFeatures/nnbd/override_checking_A03_t04.dart
index 5990959..0c24198 100644
--- a/LanguageFeatures/nnbd/override_checking_A03_t04.dart
+++ b/LanguageFeatures/nnbd/override_checking_A03_t04.dart
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+ * 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.
  */
@@ -21,27 +21,24 @@
  * classes because opted out libraries may bring together otherwise incompatible
  * member signatures without causing an error.
  *
- * @description Check that legacy class can inherit the same field from two
+ * @description Check that legacy class can inherit the same setter from two
  * opted in classes with contradictory nullability information.
  *
- * Issue 40414
  * @author iarkh@unipro.ru
  */
 // SharedOptions=--enable-experiment=non-nullable
 // Requirements=nnbd-strong
 
-import "../../Utils/expect.dart";
 import "override_checking_A03_opted_out_lib.dart";
 
-class A extends LEGACY_FIELDS_2 {
-  int?      i;
-  Object?   o;
-  Function? f;
-}
-
 main() {
-  A a = A();
-  Expect.isNull(a.i);
-  Expect.isNull(a.o);
-  Expect.isNull(a.f);
+  LEGACY_SETTER_1 x1 = LEGACY_SETTER_1();
+  x1.setInt      = null;
+  x1.setObject   = null;
+  x1.setFunction = null;
+
+  LEGACY_SETTER_2 x2 = LEGACY_SETTER_2();
+  x2.setInt      = null;
+  x2.setObject   = null;
+  x2.setFunction = null;
 }
diff --git a/LanguageFeatures/nnbd/override_checking_A03_t05.dart b/LanguageFeatures/nnbd/override_checking_A03_t05.dart
index 1575f86..eb3322a 100644
--- a/LanguageFeatures/nnbd/override_checking_A03_t05.dart
+++ b/LanguageFeatures/nnbd/override_checking_A03_t05.dart
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+ * 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.
  */
@@ -21,8 +21,8 @@
  * classes because opted out libraries may bring together otherwise incompatible
  * member signatures without causing an error.
  *
- * @description Check that legacy class can inherit the same getter from two
- * opted in classes with contradictory nullability information.
+ * @description Check that legacy class can inherit the same method with return
+ * value from two opted in classes with contradictory nullability information.
  *
  * @author iarkh@unipro.ru
  */
@@ -34,13 +34,13 @@
 import "override_checking_A03_opted_in_lib.dart";
 
 main() {
-  LEGACY_GETTER_1 x1 = LEGACY_GETTER_1();
-  Expect.isNull(x1.getInt);
-  Expect.isNull(x1.getObject);
-  Expect.isNull(x1.getFunction);
+  LEGACY_RETURN_1 x1 = LEGACY_RETURN_1();
+  Expect.isNull(x1.getInt());
+  Expect.isNull(x1.getObject());
+  Expect.isNull(x1.getFunction());
 
-  LEGACY_GETTER_2 x2 = LEGACY_GETTER_2();
-  Expect.equals(1, x2.getInt);
-  Expect.equals(1, x2.getObject);
-  Expect.equals(testme, x2.getFunction);
+  LEGACY_RETURN_2 x2 = LEGACY_RETURN_2();
+  Expect.equals(1, x2.getInt());
+  Expect.equals(1, x2.getObject());
+  Expect.equals(testme, x2.getFunction());
 }
diff --git a/LanguageFeatures/nnbd/override_checking_A03_t06.dart b/LanguageFeatures/nnbd/override_checking_A03_t06.dart
index e895444..8a15b8f 100644
--- a/LanguageFeatures/nnbd/override_checking_A03_t06.dart
+++ b/LanguageFeatures/nnbd/override_checking_A03_t06.dart
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+ * 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.
  */
@@ -21,26 +21,41 @@
  * classes because opted out libraries may bring together otherwise incompatible
  * member signatures without causing an error.
  *
- * @description Check that legacy class can inherit the same getter from two
- * opted in classes with contradictory nullability information.
+ * @description Check that generic legacy class can inherit two opted in classes
+ * with type parameters with contradictory nullability information.
  *
- * @Issue 40414
  * @author iarkh@unipro.ru
  */
 // SharedOptions=--enable-experiment=non-nullable
+// Requirements=nnbd-strong
 
-import "../../Utils/expect.dart";
 import "override_checking_A03_opted_out_lib.dart";
 
-class A extends LEGACY_GETTER_2 {
-  int?      get getInt      => null;
-  Object?   get getObject   => null;
-  Function? get getFunction => null;
-}
-
 main() {
-  A a = A();
-  Expect.isNull(a.getInt);
-  Expect.isNull(a.getObject);
-  Expect.isNull(a.getFunction);
+ LEGACY_INT_1();
+ LEGACY_INT_2();
+ LEGACY_INT_1<int?>();
+ LEGACY_INT_1<int>();
+ LEGACY_INT_2<int?>();
+ LEGACY_INT_2<int>();
+ LEGACY_INT_1<Null>();
+ LEGACY_INT_2<Null>();
+
+ LEGACY_OBJECT_1();
+ LEGACY_OBJECT_2();
+ LEGACY_OBJECT_1<Object?>();
+ LEGACY_OBJECT_1<Object>();
+ LEGACY_OBJECT_2<Object?>();
+ LEGACY_OBJECT_2<Object>();
+ LEGACY_OBJECT_1<Null>();
+ LEGACY_OBJECT_2<Null>();
+
+ LEGACY_FUNCTION_1();
+ LEGACY_FUNCTION_2();
+ LEGACY_FUNCTION_1<Function?>();
+ LEGACY_FUNCTION_1<Function>();
+ LEGACY_FUNCTION_2<Function?>();
+ LEGACY_FUNCTION_2<Function>();
+ LEGACY_FUNCTION_1<Null>();
+ LEGACY_FUNCTION_2<Null>();
 }
diff --git a/LanguageFeatures/nnbd/override_checking_A03_t07.dart b/LanguageFeatures/nnbd/override_checking_A03_t07.dart
index 93fc723..dca2626 100644
--- a/LanguageFeatures/nnbd/override_checking_A03_t07.dart
+++ b/LanguageFeatures/nnbd/override_checking_A03_t07.dart
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+ * 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.
  */
@@ -21,8 +21,8 @@
  * classes because opted out libraries may bring together otherwise incompatible
  * member signatures without causing an error.
  *
- * @description Check that legacy class can inherit the same setter from two
- * opted in classes with contradictory nullability information.
+ * @description Check that generic legacy class can inherit two opted in classes
+ * with type parameters with contradictory nullability information.
  *
  * @author iarkh@unipro.ru
  */
@@ -31,14 +31,47 @@
 
 import "override_checking_A03_opted_out_lib.dart";
 
-main() {
-  LEGACY_SETTER_1 x1 = LEGACY_SETTER_1();
-  x1.setInt      = null;
-  x1.setObject   = null;
-  x1.setFunction = null;
+class I1<T extends int?> extends LEGACY_INT_2<T> {}
+class I2<T extends int>  extends LEGACY_INT_2<T> {}
+class I3<T extends Null> extends LEGACY_INT_2<T> {}
 
-  LEGACY_SETTER_2 x2 = LEGACY_SETTER_2();
-  x2.setInt      = null;
-  x2.setObject   = null;
-  x2.setFunction = null;
+class O1<T extends Object?> extends LEGACY_OBJECT_2<T> {}
+class O2<T extends Object > extends LEGACY_OBJECT_2<T> {}
+class O3<T extends Null   > extends LEGACY_OBJECT_2<T> {}
+
+class F1<T extends Function?> extends LEGACY_FUNCTION_2<T> {}
+class F2<T extends Function > extends LEGACY_FUNCTION_2<T> {}
+class F3<T extends Null     > extends LEGACY_FUNCTION_2<T> {}
+
+main() {
+ I1();
+ I2();
+ I3();
+
+ I1<int>();
+ I1<int?>();
+ I1<Null>();
+ I2<int>();
+ I3<Null>();
+
+ O1();
+ O2();
+ O3();
+
+ O1<Object>();
+ O1<Object?>();
+ O1<Null>();
+ O2<Object>();
+ O3<Null>();
+
+ F1();
+ F2();
+ F3();
+
+ F1<Function>();
+ F1<Function?>();
+ F1<Null>();
+
+ F2<Function>();
+ F3<Null>();
 }
diff --git a/LanguageFeatures/nnbd/override_checking_A03_t08.dart b/LanguageFeatures/nnbd/override_checking_A03_t08.dart
deleted file mode 100644
index 4de776d..0000000
--- a/LanguageFeatures/nnbd/override_checking_A03_t08.dart
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 2019, 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 Members inherited in a class in an opted-in library, which are
- * inherited via a class or mixin defined in a legacy library are viewed with
- * their erased legacy signature, even if they were original defined in an
- * opted-in library. Note that if a class which is defined in a legacy library
- * inherits a member with the same name from multiple super-interfaces, then
- * error checking is done as usual using the legacy typing rules which ignore
- * nullability. This means that it is valid for a legacy class to inherit the
- * same member signature with contradictory nullability information. For the
- * purposes of member lookup within a legacy library, nullability information is
- * ignored, and so it is valid to simply erase the nullability information
- * within the legacy library. When referenced from an opted-in library, the same
- * erasure is performed, and the member is seen at its legacy type.
- *
- * We use legacy subtyping when checking inherited member signature coherence in
- * classes because opted out libraries may bring together otherwise incompatible
- * member signatures without causing an error.
- *
- * @description Check that legacy class can inherit the same setter from two
- * opted in classes with contradictory nullability information.
- *
- * Issue 40414
- * @author iarkh@unipro.ru
- */
-// SharedOptions=--enable-experiment=non-nullable
-// Requirements=nnbd-strong
-
-import "../../Utils/expect.dart";
-import "override_checking_A03_opted_out_lib.dart";
-
-class A extends LEGACY_SETTER_2 {
-  void set setInt     (int?      i) { Expect.isNull(i); }
-  void set setObject  (Object?   o) { Expect.isNull(o); }
-  void set setFunction(Function? f) { Expect.isNull(f); }
-}
-
-main() {
-  A a = A();
-  a.setInt      = null;
-  a.setObject   = null;
-  a.setFunction = null;
-}
diff --git a/LanguageFeatures/nnbd/override_checking_A03_t09.dart b/LanguageFeatures/nnbd/override_checking_A03_t09.dart
deleted file mode 100644
index 4b23e86..0000000
--- a/LanguageFeatures/nnbd/override_checking_A03_t09.dart
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (c) 2019, 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 Members inherited in a class in an opted-in library, which are
- * inherited via a class or mixin defined in a legacy library are viewed with
- * their erased legacy signature, even if they were original defined in an
- * opted-in library. Note that if a class which is defined in a legacy library
- * inherits a member with the same name from multiple super-interfaces, then
- * error checking is done as usual using the legacy typing rules which ignore
- * nullability. This means that it is valid for a legacy class to inherit the
- * same member signature with contradictory nullability information. For the
- * purposes of member lookup within a legacy library, nullability information is
- * ignored, and so it is valid to simply erase the nullability information
- * within the legacy library. When referenced from an opted-in library, the same
- * erasure is performed, and the member is seen at its legacy type.
- *
- * We use legacy subtyping when checking inherited member signature coherence in
- * classes because opted out libraries may bring together otherwise incompatible
- * member signatures without causing an error.
- *
- * @description Check that legacy class can inherit the same method with return
- * value from two opted in classes with contradictory nullability information.
- *
- * @author iarkh@unipro.ru
- */
-// SharedOptions=--enable-experiment=non-nullable
-// Requirements=nnbd-strong
-
-import "../../Utils/expect.dart";
-import "override_checking_A03_opted_out_lib.dart";
-import "override_checking_A03_opted_in_lib.dart";
-
-main() {
-  LEGACY_RETURN_1 x1 = LEGACY_RETURN_1();
-  Expect.isNull(x1.getInt());
-  Expect.isNull(x1.getObject());
-  Expect.isNull(x1.getFunction());
-
-  LEGACY_RETURN_2 x2 = LEGACY_RETURN_2();
-  Expect.equals(1, x2.getInt());
-  Expect.equals(1, x2.getObject());
-  Expect.equals(testme, x2.getFunction());
-}
diff --git a/LanguageFeatures/nnbd/override_checking_A03_t10.dart b/LanguageFeatures/nnbd/override_checking_A03_t10.dart
deleted file mode 100644
index 9084810..0000000
--- a/LanguageFeatures/nnbd/override_checking_A03_t10.dart
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 2019, 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 Members inherited in a class in an opted-in library, which are
- * inherited via a class or mixin defined in a legacy library are viewed with
- * their erased legacy signature, even if they were original defined in an
- * opted-in library. Note that if a class which is defined in a legacy library
- * inherits a member with the same name from multiple super-interfaces, then
- * error checking is done as usual using the legacy typing rules which ignore
- * nullability. This means that it is valid for a legacy class to inherit the
- * same member signature with contradictory nullability information. For the
- * purposes of member lookup within a legacy library, nullability information is
- * ignored, and so it is valid to simply erase the nullability information
- * within the legacy library. When referenced from an opted-in library, the same
- * erasure is performed, and the member is seen at its legacy type.
- *
- * We use legacy subtyping when checking inherited member signature coherence in
- * classes because opted out libraries may bring together otherwise incompatible
- * member signatures without causing an error.
- *
- * @description Check that legacy class can inherit the same method with return
- * value from two opted in classes with contradictory nullability information.
- *
- * @Issue 40414
- * @author iarkh@unipro.ru
- */
-// SharedOptions=--enable-experiment=non-nullable
-// Requirements=nnbd-strong
-
-import "../../Utils/expect.dart";
-import "override_checking_A03_opted_out_lib.dart";
-
-class A extends LEGACY_RETURN_2 {
-  int?      getInt()      => null;
-  Object?   getObject()   => null;
-  Function? getFunction() => null;
-}
-
-main() {
-  A a = A();
-  Expect.isNull(a.getInt());
-  Expect.isNull(a.getObject());
-  Expect.isNull(a.getFunction());
-}
diff --git a/LanguageFeatures/nnbd/override_checking_A03_t11.dart b/LanguageFeatures/nnbd/override_checking_A03_t11.dart
deleted file mode 100644
index 5564836..0000000
--- a/LanguageFeatures/nnbd/override_checking_A03_t11.dart
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright (c) 2019, 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 Members inherited in a class in an opted-in library, which are
- * inherited via a class or mixin defined in a legacy library are viewed with
- * their erased legacy signature, even if they were original defined in an
- * opted-in library. Note that if a class which is defined in a legacy library
- * inherits a member with the same name from multiple super-interfaces, then
- * error checking is done as usual using the legacy typing rules which ignore
- * nullability. This means that it is valid for a legacy class to inherit the
- * same member signature with contradictory nullability information. For the
- * purposes of member lookup within a legacy library, nullability information is
- * ignored, and so it is valid to simply erase the nullability information
- * within the legacy library. When referenced from an opted-in library, the same
- * erasure is performed, and the member is seen at its legacy type.
- *
- * We use legacy subtyping when checking inherited member signature coherence in
- * classes because opted out libraries may bring together otherwise incompatible
- * member signatures without causing an error.
- *
- * @description Check that generic legacy class can inherit two opted in classes
- * with type parameters with contradictory nullability information.
- *
- * @author iarkh@unipro.ru
- */
-// SharedOptions=--enable-experiment=non-nullable
-// Requirements=nnbd-strong
-
-import "override_checking_A03_opted_out_lib.dart";
-
-main() {
- LEGACY_INT_1();
- LEGACY_INT_2();
- LEGACY_INT_1<int?>();
- LEGACY_INT_1<int>();
- LEGACY_INT_2<int?>();
- LEGACY_INT_2<int>();
- LEGACY_INT_1<Null>();
- LEGACY_INT_2<Null>();
-
- LEGACY_OBJECT_1();
- LEGACY_OBJECT_2();
- LEGACY_OBJECT_1<Object?>();
- LEGACY_OBJECT_1<Object>();
- LEGACY_OBJECT_2<Object?>();
- LEGACY_OBJECT_2<Object>();
- LEGACY_OBJECT_1<Null>();
- LEGACY_OBJECT_2<Null>();
-
- LEGACY_FUNCTION_1();
- LEGACY_FUNCTION_2();
- LEGACY_FUNCTION_1<Function?>();
- LEGACY_FUNCTION_1<Function>();
- LEGACY_FUNCTION_2<Function?>();
- LEGACY_FUNCTION_2<Function>();
- LEGACY_FUNCTION_1<Null>();
- LEGACY_FUNCTION_2<Null>();
-}
diff --git a/LanguageFeatures/nnbd/override_checking_A03_t12.dart b/LanguageFeatures/nnbd/override_checking_A03_t12.dart
deleted file mode 100644
index b71341e..0000000
--- a/LanguageFeatures/nnbd/override_checking_A03_t12.dart
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Copyright (c) 2019, 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 Members inherited in a class in an opted-in library, which are
- * inherited via a class or mixin defined in a legacy library are viewed with
- * their erased legacy signature, even if they were original defined in an
- * opted-in library. Note that if a class which is defined in a legacy library
- * inherits a member with the same name from multiple super-interfaces, then
- * error checking is done as usual using the legacy typing rules which ignore
- * nullability. This means that it is valid for a legacy class to inherit the
- * same member signature with contradictory nullability information. For the
- * purposes of member lookup within a legacy library, nullability information is
- * ignored, and so it is valid to simply erase the nullability information
- * within the legacy library. When referenced from an opted-in library, the same
- * erasure is performed, and the member is seen at its legacy type.
- *
- * We use legacy subtyping when checking inherited member signature coherence in
- * classes because opted out libraries may bring together otherwise incompatible
- * member signatures without causing an error.
- *
- * @description Check that generic legacy class can inherit two opted in classes
- * with type parameters with contradictory nullability information.
- *
- * @author iarkh@unipro.ru
- */
-// SharedOptions=--enable-experiment=non-nullable
-// Requirements=nnbd-strong
-
-import "override_checking_A03_opted_out_lib.dart";
-
-class I1<T extends int?> extends LEGACY_INT_2<T> {}
-class I2<T extends int>  extends LEGACY_INT_2<T> {}
-class I3<T extends Null> extends LEGACY_INT_2<T> {}
-
-class O1<T extends Object?> extends LEGACY_OBJECT_2<T> {}
-class O2<T extends Object > extends LEGACY_OBJECT_2<T> {}
-class O3<T extends Null   > extends LEGACY_OBJECT_2<T> {}
-
-class F1<T extends Function?> extends LEGACY_FUNCTION_2<T> {}
-class F2<T extends Function > extends LEGACY_FUNCTION_2<T> {}
-class F3<T extends Null     > extends LEGACY_FUNCTION_2<T> {}
-
-main() {
- I1();
- I2();
- I3();
-
- I1<int>();
- I1<int?>();
- I1<Null>();
- I2<int>();
- I3<Null>();
-
- O1();
- O2();
- O3();
-
- O1<Object>();
- O1<Object?>();
- O1<Null>();
- O2<Object>();
- O3<Null>();
-
- F1();
- F2();
- F3();
-
- F1<Function>();
- F1<Function?>();
- F1<Null>();
-
- F2<Function>();
- F3<Null>();
-}
diff --git a/LanguageFeatures/nnbd/override_checking_A04_t01.dart b/LanguageFeatures/nnbd/override_checking_A04_t01.dart
new file mode 100644
index 0000000..1254c03
--- /dev/null
+++ b/LanguageFeatures/nnbd/override_checking_A04_t01.dart
@@ -0,0 +1,75 @@
+/*
+ * 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)].
+ *
+ * If a class [C] in an opted-in library overrides a member, it is an error if
+ * its signature is not a subtype of the types of all overriden members from all
+ * super-interfaces (whether legacy or opted-in). For the purposes of override
+ * checking, members which are inherited from opted-in classes through legacy
+ * classes are still checked against each original declaration at its opted-in
+ * type. For example, the following override is considered an error.
+ *
+ *  // opted_in.dart
+ *  class A {
+ *      int foo(int? x) {}
+ *  }
+ *  // opted_out.dart
+ *  // @dart = 2.6
+ *  import 'opted_in.dart';
+ *
+ * class B extends A {}
+ *  // opted_in.dart
+ *  class C extends B {
+ *  // Override checking is done against the opted-in signature of A.foo
+ *  int? foo(int x) {}
+ *  }
+ *
+ * @description  Check that if legacy class inherits a method with parameter
+ * from two opted in classes with contradictory nullability information and than
+ * this method is inherited again in the opted in code, compile error appears
+ * for non-nullable parameter.
+ *
+ * @Issue 40414
+ * @author iarkh@unipro.ru
+ */
+// SharedOptions=--enable-experiment=non-nullable
+// Requirements=nnbd-strong
+
+import "override_checking_A03_opted_out_lib.dart";
+
+class A extends LEGACY_ARGS_2 {
+  void test_int     (int?      i) {}
+  void test_object  (Object?   o) {}
+  void test_function(Function? f) {}
+}
+
+class B extends LEGACY_ARGS_2 {
+  void test_int     (int i) {}
+//     ^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+  void test_object  (Object o) {}
+//     ^^^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+  void test_function(Function f) {}
+//     ^^^^^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+}
+
+main() {
+  A();
+  B();
+}
diff --git a/LanguageFeatures/nnbd/override_checking_A04_t02.dart b/LanguageFeatures/nnbd/override_checking_A04_t02.dart
new file mode 100644
index 0000000..6ef398a
--- /dev/null
+++ b/LanguageFeatures/nnbd/override_checking_A04_t02.dart
@@ -0,0 +1,87 @@
+/*
+ * 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)].
+ *
+ * If a class [C] in an opted-in library overrides a member, it is an error if
+ * its signature is not a subtype of the types of all overriden members from all
+ * super-interfaces (whether legacy or opted-in). For the purposes of override
+ * checking, members which are inherited from opted-in classes through legacy
+ * classes are still checked against each original declaration at its opted-in
+ * type. For example, the following override is considered an error.
+ *
+ *  // opted_in.dart
+ *  class A {
+ *      int foo(int? x) {}
+ *  }
+ *  // opted_out.dart
+ *  // @dart = 2.6
+ *  import 'opted_in.dart';
+ *
+ * class B extends A {}
+ *  // opted_in.dart
+ *  class C extends B {
+ *  // Override checking is done against the opted-in signature of A.foo
+ *  int? foo(int x) {}
+ *  }
+ *
+ * @description  Check that if legacy class inherits a field from two opted in
+ * classes with contradictory nullability information and than this field is
+ * inherited again in the opted in code, compile error appears.
+ *
+ * @Issue 40414
+ * @author iarkh@unipro.ru
+ */
+// SharedOptions=--enable-experiment=non-nullable
+// Requirements=nnbd-strong
+
+import "override_checking_A03_opted_out_lib.dart";
+
+class A extends LEGACY_FIELDS_2 {
+  int?      i;
+//          ^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+  Object?   o;
+//          ^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+  Function? f;
+//          ^
+// [analyzer] unspecified
+// [cfe] unspecified
+}
+
+void testme() {}
+
+class B extends LEGACY_FIELDS_2 {
+  int      i = 1;
+//         ^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+  Object   o = 1;
+//         ^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+  Function f = testme;
+//         ^
+// [analyzer] unspecified
+// [cfe] unspecified
+}
+
+main() {
+  A();
+  B();
+}
diff --git a/LanguageFeatures/nnbd/override_checking_A04_t03.dart b/LanguageFeatures/nnbd/override_checking_A04_t03.dart
new file mode 100644
index 0000000..d6a3f24
--- /dev/null
+++ b/LanguageFeatures/nnbd/override_checking_A04_t03.dart
@@ -0,0 +1,76 @@
+/*
+ * 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)].
+ *
+ * If a class [C] in an opted-in library overrides a member, it is an error if
+ * its signature is not a subtype of the types of all overriden members from all
+ * super-interfaces (whether legacy or opted-in). For the purposes of override
+ * checking, members which are inherited from opted-in classes through legacy
+ * classes are still checked against each original declaration at its opted-in
+ * type. For example, the following override is considered an error.
+ *
+ *  // opted_in.dart
+ *  class A {
+ *      int foo(int? x) {}
+ *  }
+ *  // opted_out.dart
+ *  // @dart = 2.6
+ *  import 'opted_in.dart';
+ *
+ * class B extends A {}
+ *  // opted_in.dart
+ *  class C extends B {
+ *  // Override checking is done against the opted-in signature of A.foo
+ *  int? foo(int x) {}
+ *  }
+ *
+ * @description  Check that if legacy class inherits a getter from two opted in
+ * classes with contradictory nullability information and than this getter is
+ * inherited again in the opted in code, compile error appears.
+ *
+ * @Issue 40414
+ * @author iarkh@unipro.ru
+ */
+// SharedOptions=--enable-experiment=non-nullable
+// Requirements=nnbd-strong
+
+import "override_checking_A03_opted_out_lib.dart";
+
+class A extends LEGACY_GETTER_2 {
+  int?      get getInt => null;
+//              ^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+  Object?   get getObject => null;
+//              ^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+  Function? get getFunction => null;
+//              ^^^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+}
+
+void testme() {}
+
+class B extends LEGACY_GETTER_2 {
+  int      get getInt      => 1;
+  Object   get getObject   => 1;
+  Function get getFunction => testme;
+}
+
+main() {
+  A();
+  B();
+}
diff --git a/LanguageFeatures/nnbd/override_checking_A04_t04.dart b/LanguageFeatures/nnbd/override_checking_A04_t04.dart
new file mode 100644
index 0000000..6825d03
--- /dev/null
+++ b/LanguageFeatures/nnbd/override_checking_A04_t04.dart
@@ -0,0 +1,74 @@
+/*
+ * 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)].
+ *
+ * If a class [C] in an opted-in library overrides a member, it is an error if
+ * its signature is not a subtype of the types of all overriden members from all
+ * super-interfaces (whether legacy or opted-in). For the purposes of override
+ * checking, members which are inherited from opted-in classes through legacy
+ * classes are still checked against each original declaration at its opted-in
+ * type. For example, the following override is considered an error.
+ *
+ *  // opted_in.dart
+ *  class A {
+ *      int foo(int? x) {}
+ *  }
+ *  // opted_out.dart
+ *  // @dart = 2.6
+ *  import 'opted_in.dart';
+ *
+ * class B extends A {}
+ *  // opted_in.dart
+ *  class C extends B {
+ *  // Override checking is done against the opted-in signature of A.foo
+ *  int? foo(int x) {}
+ *  }
+ *
+ * @description  Check that if legacy class inherits a setter from two opted in
+ * classes with contradictory nullability information and than this setter is
+ * inherited again in the opted in code, compile error appears.
+ *
+ * @Issue 40414
+ * @author iarkh@unipro.ru
+ */
+// SharedOptions=--enable-experiment=non-nullable
+// Requirements=nnbd-strong
+
+import "override_checking_A03_opted_out_lib.dart";
+
+class A extends LEGACY_SETTER_2 {
+  void set setInt     (int?      i) {}
+  void set setObject  (Object?   o) {}
+  void set setFunction(Function? f) {}
+}
+
+class B extends LEGACY_SETTER_2 {
+  void set setInt     (int      i) {}
+//         ^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+  void set setObject  (Object   o) {}
+//         ^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+  void set setFunction(Function f) {}
+//         ^^^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+}
+
+main() {
+  A();
+  B();
+}
diff --git a/LanguageFeatures/nnbd/override_checking_A04_t05.dart b/LanguageFeatures/nnbd/override_checking_A04_t05.dart
new file mode 100644
index 0000000..e5667f8
--- /dev/null
+++ b/LanguageFeatures/nnbd/override_checking_A04_t05.dart
@@ -0,0 +1,77 @@
+/*
+ * 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)].
+ *
+ * If a class [C] in an opted-in library overrides a member, it is an error if
+ * its signature is not a subtype of the types of all overriden members from all
+ * super-interfaces (whether legacy or opted-in). For the purposes of override
+ * checking, members which are inherited from opted-in classes through legacy
+ * classes are still checked against each original declaration at its opted-in
+ * type. For example, the following override is considered an error.
+ *
+ *  // opted_in.dart
+ *  class A {
+ *      int foo(int? x) {}
+ *  }
+ *  // opted_out.dart
+ *  // @dart = 2.6
+ *  import 'opted_in.dart';
+ *
+ * class B extends A {}
+ *  // opted_in.dart
+ *  class C extends B {
+ *  // Override checking is done against the opted-in signature of A.foo
+ *  int? foo(int x) {}
+ *  }
+ *
+ * @description  Check that if legacy class inherits a function with return
+ * value from two opted in classes with contradictory nullability information
+ * and than this function is inherited again in the opted in code, compile error
+ * appears.
+ *
+ * @Issue 40414
+ * @author iarkh@unipro.ru
+ */
+// SharedOptions=--enable-experiment=non-nullable
+// Requirements=nnbd-strong
+
+import "override_checking_A03_opted_out_lib.dart";
+
+class A extends LEGACY_RETURN_2 {
+  int?      getInt()      => null;
+//          ^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+  Object?   getObject()   => null;
+//          ^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+  Function? getFunction() => null;
+//          ^^^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+}
+
+void testme() {}
+
+class B extends LEGACY_RETURN_2 {
+  int      getInt()      => 1;
+  Object   getObject()   => 1;
+  Function getFunction() => testme;
+}
+
+main() {
+  A();
+  B();
+}