Fixed Issue #465: overriding tests updated according to the Issue #40454 evaluation.
diff --git a/LanguageFeatures/nnbd/override_checking_A06_opted_out_lib.dart b/LanguageFeatures/nnbd/override_checking_A06_opted_out_lib.dart
index 25411a1..6897d3d 100644
--- a/LanguageFeatures/nnbd/override_checking_A06_opted_out_lib.dart
+++ b/LanguageFeatures/nnbd/override_checking_A06_opted_out_lib.dart
@@ -46,7 +46,7 @@
/* Here is a table of test cases:
Object Object? Object* Int Int? Int* Function Function? Function* Dynamic Dynamic* Void Void* Null Null* Never Never* FO FO* FO<int> FO<int?> FO<FO> FO<int>* FO<FO>*
Object 1 3 30 4 4 31 4 4 31 5 32 5 32 5 32 6 114 65 33 82 83 84 33 33
-Object? 3 2 26 7 7 27 7 7 27 10 29 11 29 8 27 9 114 64 28 82 83 84 28 28
+Object? 3 2 26 7 7 27 7 7 27 10 29 11 29 8 27 9 114 64 159 82 83 84 28 159
Object* 30 26 115 19 13 120 23 96 120 43 121 52 122 59 120 123 120 71 124 106 107 108 120 124
Int 4 7 19 15 16 18 34 34 19 40 20 49 20 56 20 131 133 63 21 79 80 81 21 21
Int? 4 7 13 16 17 12 35 35 13 40 13 49 13 56 13 131 133 63 14 79 80 81 14 14
@@ -54,18 +54,18 @@
Function 4 7 23 34 35 23 37 38 22 40 24 49 24 56 24 131 133 63 25 79 80 81 25 25
Function? 4 7 96 34 35 96 38 36 97 40 98 49 98 56 98 131 133 63 99 79 80 81 99 99
Function* 31 27 120 19 13 125 22 97 115 44 126 53 126 59 126 132 126 69 126 103 104 105 126 126
-Dynamic 5 10 43 40 40 44 40 40 44 39 46 42 47 41 44 135 136 67 45 87 88 89 45 45
+Dynamic 5 10 43 40 40 44 40 40 44 39 46 42 47 41 44 135 136 67 158 87 88 89 45 158
Dynamic* 32 29 121 20 13 125 24 98 126 46 116 100 130 60 127 137 138 70 139 140 140 134 128 139
Void 5 11 52 49 49 53 49 49 53 42 100 48 51 50 53 141 142 68 55 90 91 92 55 55
Void* 32 29 122 20 13 125 24 98 126 47 130 51 116 60 127 143 144 72 147 146 146 148 128 147
Null 5 8 59 56 56 59 56 56 59 41 60 50 60 57 58 145 154 66 61 93 94 95 61 61
Null* 32 27 120 20 13 125 24 98 126 44 127 53 127 58 116 155 156 69 127 103 104 105 127 127
Never 6 9 123 131 131 132 131 131 132 135 137 141 143 145 155 119 157 150 152 150 150 150 152 152
-FO 65 64 71 63 63 69 63 63 69 67 70 68 72 66 69 150 151 62 74 101 101 102 73 73
-FO* 33 28 124 21 14 125 25 99 126 45 139 55 147 61 127 152 153 74 117 109 110 113 128 149
+FO 65 64 71 63 63 69 63 63 69 67 70 68 72 66 69 150 151 62 74 101 101 102 73 160
+FO* 33 159 124 21 14 125 25 99 126 158 139 55 147 61 127 152 153 74 117 109 110 113 128 149
FO<int> 82 82 106 79 79 103 79 79 103 87 140 90 146 93 103 150 151 101 109 75 78 111 112 109
FO<int?> 83 83 107 80 80 104 80 80 104 88 140 91 146 94 104 150 151 101 110 78 76 111 85 110
FO<FO> 84 84 108 81 81 105 81 81 105 89 134 92 148 95 105 150 151 102 113 111 111 77 113 86
FO<int>>* 33 28 120 21 14 129 25 99 126 45 128 55 128 61 127 152 153 73 128 112 85 113 117 128
-FO<FO>>* 33 28 124 21 14 125 25 99 126 45 139 55 147 61 127 152 153 73 149 109 110 86 128 117
+FO<FO>>* 33 159 124 21 14 125 25 99 126 158 139 55 147 61 127 152 153 160 149 109 110 86 128 117
*/
\ No newline at end of file
diff --git a/LanguageFeatures/nnbd/override_checking_A06_t028.dart b/LanguageFeatures/nnbd/override_checking_A06_t028.dart
index 294ba66..0edc491 100644
--- a/LanguageFeatures/nnbd/override_checking_A06_t028.dart
+++ b/LanguageFeatures/nnbd/override_checking_A06_t028.dart
@@ -11,10 +11,9 @@
* 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
- * [Object?] vs any legacy [FutureOr] type.
+ * @description Check that error occurs as a result of [NNBD_TOP_MERGE(Object?,
+ * FutureOr<int>*)].
*
- * @Issue 40454
* @author iarkh@unipro.ru
*/
// SharedOptions=--enable-experiment=non-nullable
@@ -24,34 +23,14 @@
class B extends A<Object?> {}
-class in_FutureOr extends out_FutureOr implements B {}
-// ^^^^^^^^^^^
-// [analyzer] unspecified
-// [cfe] unspecified
-
class in_FutureOr_int extends out_FutureOr_int implements B {}
// ^^^^^^^^^^^^^^^
// [analyzer] unspecified
// [cfe] unspecified
-class in_FutureOr_FutureOr extends out_FutureOr_FutureOr implements B {}
-// ^^^^^^^^^^^^^^^^^^^^
-// [analyzer] unspecified
-// [cfe] unspecified
-
-class in_FutureOr1 extends B implements out_FutureOr {}
-// ^^^^^^^^^^^^
-// [analyzer] unspecified
-// [cfe] unspecified
-
class in_FutureOr_int1 extends B implements out_FutureOr_int {}
// ^^^^^^^^^^^^^^^^
// [analyzer] unspecified
// [cfe] unspecified
-class in_FutureOr_FutureOr1 extends B implements out_FutureOr_FutureOr {}
-// ^^^^^^^^^^^^^^^^^^^^^
-// [analyzer] unspecified
-// [cfe] unspecified
-
main() {}
diff --git a/LanguageFeatures/nnbd/override_checking_A06_t045.dart b/LanguageFeatures/nnbd/override_checking_A06_t045.dart
index 875612d..91eeab9 100644
--- a/LanguageFeatures/nnbd/override_checking_A06_t045.dart
+++ b/LanguageFeatures/nnbd/override_checking_A06_t045.dart
@@ -11,10 +11,9 @@
* 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
- * [dynamic] vs any legacy [FutureOr] type.
+ * @description Check that error occurs as a result of [NNBD_TOP_MERGE(dynamic,
+ * FutureOr(int)*] type.
*
- * @Issue 40454
* @author iarkh@unipro.ru
*/
// SharedOptions=--enable-experiment=non-nullable
@@ -24,34 +23,14 @@
class B extends A<dynamic> {}
-class in_FutureOr extends out_FutureOr implements B {}
-// ^^^^^^^^^^^
-// [analyzer] unspecified
-// [cfe] unspecified
-
class in_FutureOr_int extends out_FutureOr_int implements B {}
// ^^^^^^^^^^^^^^^
// [analyzer] unspecified
// [cfe] unspecified
-class in_FutureOr_FutureOr extends out_FutureOr_FutureOr implements B {}
-// ^^^^^^^^^^^^^^^^^^^^
-// [analyzer] unspecified
-// [cfe] unspecified
-
-class in_FutureOr1 extends B implements out_FutureOr {}
-// ^^^^^^^^^^^^
-// [analyzer] unspecified
-// [cfe] unspecified
-
class in_FutureOr_int1 extends B implements out_FutureOr_int {}
// ^^^^^^^^^^^^^^^^
// [analyzer] unspecified
// [cfe] unspecified
-class in_FutureOr_FutureOr1 extends B implements out_FutureOr_FutureOr {}
-// ^^^^^^^^^^^^^^^^^^^^^
-// [analyzer] unspecified
-// [cfe] unspecified
-
main() {}
diff --git a/LanguageFeatures/nnbd/override_checking_A06_t064.dart b/LanguageFeatures/nnbd/override_checking_A06_t064.dart
index 4818546..a78f80e 100644
--- a/LanguageFeatures/nnbd/override_checking_A06_t064.dart
+++ b/LanguageFeatures/nnbd/override_checking_A06_t064.dart
@@ -11,30 +11,27 @@
* 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(FutureOr,
- * Object?)].
+ * @description Check that result of [NNBD_TOP_MERGE(FutureOr, Object?)] is
+ * [FutureOr].
*
- * @Issue 40454
+ * @Issue 40454, 40541
* @author iarkh@unipro.ru
*/
// SharedOptions=--enable-experiment=non-nullable
// Requirements=nnbd-strong
import "dart:async";
+import "../../Utils/expect.dart";
-class A<T> {}
+class A<T> { Type getType() => T; }
class B extends A<FutureOr> {}
class C extends A<Object? > {}
class D1 extends C implements B {}
-// ^^
-// [analyzer] unspecified
-// [cfe] unspecified
-
class D2 extends B implements C {}
-// ^^
-// [analyzer] unspecified
-// [cfe] unspecified
-main() {}
+main() {
+ Expect.equals(typeOf<Object?>(), D1().getType());
+ Expect.equals(typeOf<Object?>(), D2().getType());
+}
diff --git a/LanguageFeatures/nnbd/override_checking_A06_t067.dart b/LanguageFeatures/nnbd/override_checking_A06_t067.dart
index c71528d..c18618e 100644
--- a/LanguageFeatures/nnbd/override_checking_A06_t067.dart
+++ b/LanguageFeatures/nnbd/override_checking_A06_t067.dart
@@ -11,29 +11,27 @@
* 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(FutureOr,
- * dynamic)].
+ * @description Check that result of [NNBD_TOP_MERGE(FutureOr,dynamic)] is
+ * [FutureOr].
*
- * @Issue 40454
+ * @Issue 40454, 40541
* @author iarkh@unipro.ru
*/
// SharedOptions=--enable-experiment=non-nullable
// Requirements=nnbd-strong
import "dart:async";
+import "../../Utils/expect.dart";
-class A<T> {}
-class B implements A<FutureOr> {}
-class C implements A<dynamic> {}
+class A<T> { Type getType() => T; }
+class B extends A<FutureOr> {}
+class C extends A<dynamic > {}
-class D1 extends B implements C {}
-// ^^
-// [analyzer] unspecified
-// [cfe] unspecified
-class D2 extends C implements B {}
-// ^^
-// [analyzer] unspecified
-// [cfe] unspecified
+class D1 extends C implements B {}
+class D2 extends B implements C {}
-void main() {}
+main() {
+ Expect.equals(dynamic, D1().getType());
+ Expect.equals(dynamic, D2().getType());
+}
diff --git a/LanguageFeatures/nnbd/override_checking_A06_t068.dart b/LanguageFeatures/nnbd/override_checking_A06_t068.dart
index 912deec..7af59b1 100644
--- a/LanguageFeatures/nnbd/override_checking_A06_t068.dart
+++ b/LanguageFeatures/nnbd/override_checking_A06_t068.dart
@@ -11,29 +11,27 @@
* 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(FutureOr,
- * void)].
+ * @description Check that result of [NNBD_TOP_MERGE(FutureOr,void)] is
+ * [FutureOr].
*
- * @Issue 40454
+ * @Issue 40454, 40541
* @author iarkh@unipro.ru
*/
// SharedOptions=--enable-experiment=non-nullable
// Requirements=nnbd-strong
import "dart:async";
+import "../../Utils/expect.dart";
-class A<T> {}
-class B implements A<FutureOr> {}
-class C implements A<void > {}
+class A<T> { Type getType() => T; }
+class B extends A<FutureOr> {}
+class C extends A<void > {}
-class D1 extends B implements C {}
-// ^^
-// [analyzer] unspecified
-// [cfe] unspecified
-class D2 extends C implements B {}
-// ^^
-// [analyzer] unspecified
-// [cfe] unspecified
+class D1 extends C implements B {}
+class D2 extends B implements C {}
-void main() {}
+main() {
+ Expect.equals(FutureOr, D1().getType());
+ Expect.equals(FutureOr, D2().getType());
+}
diff --git a/LanguageFeatures/nnbd/override_checking_A06_t070.dart b/LanguageFeatures/nnbd/override_checking_A06_t070.dart
index f88fdcd..e5991a8 100644
--- a/LanguageFeatures/nnbd/override_checking_A06_t070.dart
+++ b/LanguageFeatures/nnbd/override_checking_A06_t070.dart
@@ -11,28 +11,25 @@
* 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 compile error is thrown as a result of
- * [NNBD_TOP_MERGE(FutureOr, dynamic*)]
+ * @description Check that cthe result of [NNBD_TOP_MERGE(FutureOr, dynamic*)]
+ * is dynamic.
*
- * @Issue 40454
+ * @Issue 40454, 40541
* @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 B extends A<FutureOr> {}
class in1 extends out_dynamic implements B {}
-// ^^^
-// [analyzer] unspecified
-// [cfe] unspecified
-
class in2 extends B implements out_dynamic {}
-// ^^^
-// [analyzer] unspecified
-// [cfe] unspecified
-main() {}
+main() {
+ Expect.equals(FutureOr, in1().getType());
+ Expect.equals(FutureOr, in2().getType());
+}
diff --git a/LanguageFeatures/nnbd/override_checking_A06_t071.dart b/LanguageFeatures/nnbd/override_checking_A06_t071.dart
index 7beb84f..aa382a0 100644
--- a/LanguageFeatures/nnbd/override_checking_A06_t071.dart
+++ b/LanguageFeatures/nnbd/override_checking_A06_t071.dart
@@ -11,28 +11,25 @@
* 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 compile error is thrown as a result of
- * [NNBD_TOP_MERGE(FutureOr, Object*)]
+ * @description Check that the result of [NNBD_TOP_MERGE(FutureOr, Object*)] is
+ * [Object?]
*
- * @Issue 40454
+ * @Issue 40454, 40481
* @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 B extends A<FutureOr> {}
-class in1 extends out_Object implements B {}
-// ^^^
-// [analyzer] unspecified
-// [cfe] unspecified
+class in1 extends out_Object implements B {}
+class in2 extends B implements out_Object {}
-class in2 extends B implements out_Object {}
-// ^^^
-// [analyzer] unspecified
-// [cfe] unspecified
-
-main() {}
+main() {
+ Expect.equals(typeOf<Object?>(), in1().getType());
+ Expect.equals(typeOf<Object?>(), in2().getType());
+}
diff --git a/LanguageFeatures/nnbd/override_checking_A06_t072.dart b/LanguageFeatures/nnbd/override_checking_A06_t072.dart
index ad2c069..7a849ec 100644
--- a/LanguageFeatures/nnbd/override_checking_A06_t072.dart
+++ b/LanguageFeatures/nnbd/override_checking_A06_t072.dart
@@ -11,28 +11,25 @@
* 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 compile error is thrown as a result of
- * [NNBD_TOP_MERGE(FutureOr, void*)]
+ * @description Check that compile the result of [NNBD_TOP_MERGE(FutureOr,
+ * void*)] is [FutureOr].
*
- * @Issue 40454
+ * @Issue 40454, 40541
* @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 B extends A<FutureOr> {}
class in1 extends out_void implements B {}
-// ^^^
-// [analyzer] unspecified
-// [cfe] unspecified
-
class in2 extends B implements out_void {}
-// ^^^
-// [analyzer] unspecified
-// [cfe] unspecified
-main() {}
+main() {
+ Expect.equals(FutureOr, in1().getType());
+ Expect.equals(FutureOr, in2().getType());
+}
diff --git a/LanguageFeatures/nnbd/override_checking_A06_t073.dart b/LanguageFeatures/nnbd/override_checking_A06_t073.dart
index 78a28a2..fcd3e19 100644
--- a/LanguageFeatures/nnbd/override_checking_A06_t073.dart
+++ b/LanguageFeatures/nnbd/override_checking_A06_t073.dart
@@ -11,10 +11,9 @@
* 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
- * [FutureOr] vs [FutureOr<int>*], [FutureOr<FutureOr>*].
+ * @description Check that error occurs as a result of [NNBD_TOP_MERGE(FutureOr,
+ * FutureOr<int>*.
*
- * @Issue 40454
* @author iarkh@unipro.ru
*/
// SharedOptions=--enable-experiment=non-nullable
@@ -35,14 +34,4 @@
// [analyzer] unspecified
// [cfe] unspecified
-class in3 extends out_FutureOr_FutureOr implements B {}
-// ^^^
-// [analyzer] unspecified
-// [cfe] unspecified
-
-class in4 extends B implements out_FutureOr_FutureOr {}
-// ^^^
-// [analyzer] unspecified
-// [cfe] unspecified
-
main() {}
diff --git a/LanguageFeatures/nnbd/override_checking_A06_t089.dart b/LanguageFeatures/nnbd/override_checking_A06_t089.dart
index 576cc5d..c3cdf15 100644
--- a/LanguageFeatures/nnbd/override_checking_A06_t089.dart
+++ b/LanguageFeatures/nnbd/override_checking_A06_t089.dart
@@ -11,29 +11,26 @@
* 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(
- * FutureOr<FutureOr>, dynamic)].
+ * @description Check that the result of [NNBD_TOP_MERGE(FutureOr<FutureOr>,
+ * dynamic)] is dynamic.
*
- * @Issue 40454
+ * @Issue 40454, 40541
* @author iarkh@unipro.ru
*/
// SharedOptions=--enable-experiment=non-nullable
// Requirements=nnbd-strong
import "dart:async";
+import "../../Utils/expect.dart";
-class A<T> {}
-class B implements A<FutureOr<FutureOr>> {}
-class C implements A<dynamic> {}
+class A<T> { Type getType() => T; }
+class B extends A<FutureOr<FutureOr>> {}
+class C extends A<dynamic> {}
class D1 extends B implements C {}
-// ^^
-// [analyzer] unspecified
-// [cfe] unspecified
-
class D2 extends C implements B {}
-// ^^
-// [analyzer] unspecified
-// [cfe] unspecified
-void main() {}
+void main() {
+ Expect.equals(dynamic, D1().getType());
+ Expect.equals(dynamic, D2().getType());
+}
diff --git a/LanguageFeatures/nnbd/override_checking_A06_t102.dart b/LanguageFeatures/nnbd/override_checking_A06_t102.dart
index 95b5bd5..4464a50 100644
--- a/LanguageFeatures/nnbd/override_checking_A06_t102.dart
+++ b/LanguageFeatures/nnbd/override_checking_A06_t102.dart
@@ -11,29 +11,27 @@
* 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(FutureOr,
- * FutureOr<FutureOr>].
+ * @description Check that the result of [NNBD_TOP_MERGE(FutureOr,
+ * FutureOr<FutureOr>] is [FutureOr].
*
- * @Issue 40454
+ * @Issue 40454, 40541
* @author iarkh@unipro.ru
*/
// SharedOptions=--enable-experiment=non-nullable
// Requirements=nnbd-strong
import "dart:async";
+import "../../Utils/expect.dart";
-class A<T> {}
-class B implements A<FutureOr> {}
-class C implements A<FutureOr<FutureOr>> {}
+class A<T> { Type getType() => T; }
+
+class B extends A<FutureOr> {}
+class C extends A<FutureOr<FutureOr>> {}
class D1 extends B implements C {}
-// ^^
-// [analyzer] unspecified
-// [cfe] unspecified
-
class D2 extends C implements B {}
-// ^^
-// [analyzer] unspecified
-// [cfe] unspecified
-void main() {}
+void main() {
+ Expect.equals(FutureOr, D1().getType());
+ Expect.equals(FutureOr, D2().getType());
+}
diff --git a/LanguageFeatures/nnbd/override_checking_A06_t124.dart b/LanguageFeatures/nnbd/override_checking_A06_t124.dart
index 1e47871..5b5bef8 100644
--- a/LanguageFeatures/nnbd/override_checking_A06_t124.dart
+++ b/LanguageFeatures/nnbd/override_checking_A06_t124.dart
@@ -15,7 +15,7 @@
* [NNBD_TOP_MERGE(Object*, FutureOr*)] is [Object?]
* [NNBD_TOP_MERGE(Object*, FutureOr<FutureOr>*)] is [Object?]
*
- * @Issue 40454
+ * @Issue 40454, 40481
* @author iarkh@unipro.ru
*/
// SharedOptions=--enable-experiment=non-nullable
diff --git a/LanguageFeatures/nnbd/override_checking_A06_t139.dart b/LanguageFeatures/nnbd/override_checking_A06_t139.dart
index 7ad6070..542353b 100644
--- a/LanguageFeatures/nnbd/override_checking_A06_t139.dart
+++ b/LanguageFeatures/nnbd/override_checking_A06_t139.dart
@@ -12,10 +12,10 @@
* implement the canonical interface given by [NNBD_TOP_MERGE(S0, ..., Sn)].
*
* @description Check the following cases:
- * [NNBD_TOP_MERGE(dynamic*, FutureOr*)] is [Object?]
- * [NNBD_TOP_MERGE(dynamic*, FutureOr<FutureOr>*)] is [Object?]
+ * [NNBD_TOP_MERGE(dynamic*, FutureOr*)] is [dynamic]
+ * [NNBD_TOP_MERGE(dynamic*, FutureOr<FutureOr>*)] is [dynamic]
*
- * @Issue 40454
+ * @Issue 40454, 40541
* @author iarkh@unipro.ru
*/
// SharedOptions=--enable-experiment=non-nullable
diff --git a/LanguageFeatures/nnbd/override_checking_A06_t149.dart b/LanguageFeatures/nnbd/override_checking_A06_t149.dart
index e20781f..6d89be3 100644
--- a/LanguageFeatures/nnbd/override_checking_A06_t149.dart
+++ b/LanguageFeatures/nnbd/override_checking_A06_t149.dart
@@ -11,25 +11,23 @@
* 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(
- * FutureOr*, FutureOr<FutureOr>*).
+ * @description Check that the result of [NNBD_TOP_MERGE(FutureOr*,
+ * FutureOr<FutureOr>*)] is [FutureOr].
*
- * Issue @40454
+ * Issue @40454, 40541
* @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_FutureOr_FutureOr {}
-// ^^
-// [analyzer] unspecified
-// [cfe] unspecified
+class C1 extends out_FutureOr implements out_FutureOr_FutureOr {}
+class C2 extends out_FutureOr_FutureOr implements out_FutureOr {}
-class C2 extends out_FutureOr_FutureOr implements out_FutureOr {}
-// ^^
-// [analyzer] unspecified
-// [cfe] unspecified
-
-main() {}
+main() {
+ Expect.equals(typeOf<FutureOr>(), C1().getType());
+ Expect.equals(typeOf<FutureOr>(), C2().getType());
+}
diff --git a/LanguageFeatures/nnbd/override_checking_A06_t152.dart b/LanguageFeatures/nnbd/override_checking_A06_t152.dart
index 81b1e16..d779e70 100644
--- a/LanguageFeatures/nnbd/override_checking_A06_t152.dart
+++ b/LanguageFeatures/nnbd/override_checking_A06_t152.dart
@@ -11,10 +11,11 @@
* 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
- * [Null] vs [FutureOr*].
+ * @description Check that error occurs as a result of the following cases:
+ * NNBD_TOP_MERGE(Never, FutureOr*)
+ * NNBD_TOP_MERGE(Never, FutureOr<int>*)
+ * NNBD_TOP_MERGE(Never, FutureOr<FutureOr>*)
*
- * @Issue 40454
* @author iarkh@unipro.ru
*/
// SharedOptions=--enable-experiment=non-nullable
@@ -22,7 +23,7 @@
import "override_checking_A06_opted_out_lib.dart";
-class B extends A<Null> {}
+class B extends A<Never> {}
class in_FutureOr extends out_FutureOr implements B {}
// ^^^^^^^^^^^
diff --git a/LanguageFeatures/nnbd/override_checking_A06_t158.dart b/LanguageFeatures/nnbd/override_checking_A06_t158.dart
new file mode 100644
index 0000000..83fa936
--- /dev/null
+++ b/LanguageFeatures/nnbd/override_checking_A06_t158.dart
@@ -0,0 +1,40 @@
+/*
+ * 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 the result of the following cases:
+ * NNBD_TOP_MERGE(dynamic, FutureOr*)
+ * NNBD_TOP_MERGE(dynamic, FutureOr<FutureOr>*)
+ *
+ * @Issue 40454, 40541
+ * @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 B extends A<dynamic> {}
+
+class C1 extends out_FutureOr implements B {}
+class C2 extends out_FutureOr_FutureOr implements B {}
+
+class C3 extends B implements out_FutureOr {}
+class C4 extends B implements out_FutureOr_FutureOr {}
+
+main() {
+ Expect.equals(dynamic, C1().getType());
+ Expect.equals(dynamic, C2().getType());
+ Expect.equals(dynamic, C3().getType());
+ Expect.equals(dynamic, C4().getType());
+}
diff --git a/LanguageFeatures/nnbd/override_checking_A06_t159.dart b/LanguageFeatures/nnbd/override_checking_A06_t159.dart
new file mode 100644
index 0000000..57e478c
--- /dev/null
+++ b/LanguageFeatures/nnbd/override_checking_A06_t159.dart
@@ -0,0 +1,40 @@
+/*
+ * 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 the result of the following cases:
+ * NNBD_TOP_MERGE(Object?, FutureOr*)
+ * NNBD_TOP_MERGE(Object?, FutureOr<FutureOr>*)
+ *
+ * @Issue 40454, 40541
+ * @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 B extends A<Object?> {}
+
+class C1 extends out_FutureOr implements B {}
+class C2 extends out_FutureOr_FutureOr implements B {}
+
+class C3 extends B implements out_FutureOr {}
+class C4 extends B implements out_FutureOr_FutureOr {}
+
+main() {
+ Expect.equals(typeOf<Object?>(), C1().getType());
+ Expect.equals(typeOf<Object?>(), C2().getType());
+ Expect.equals(typeOf<Object?>(), C3().getType());
+ Expect.equals(typeOf<Object?>(), C4().getType());
+}
diff --git a/LanguageFeatures/nnbd/override_checking_A06_t160.dart b/LanguageFeatures/nnbd/override_checking_A06_t160.dart
new file mode 100644
index 0000000..0dec071
--- /dev/null
+++ b/LanguageFeatures/nnbd/override_checking_A06_t160.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 the result of [NNBD_TOP_MERGE(FutureOr,
+ * FutureOr<FutureOr>*)] is [FutureOr].
+ *
+ * @Issue 40454, 40541
+ * @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 B extends A<FutureOr> {}
+
+class C1 extends out_FutureOr_FutureOr implements B {}
+class C2 extends B implements out_FutureOr_FutureOr {}
+
+main() {
+ Expect.equals(FutureOr, C1().getType());
+ Expect.equals(FutureOr, C2().getType());
+}