Null-aware static errors tests fixed
diff --git a/LanguageFeatures/nnbd/static_errors_A20_t01.dart b/LanguageFeatures/nnbd/static_errors_A20_t01.dart
index b29c83a..a409c25 100644
--- a/LanguageFeatures/nnbd/static_errors_A20_t01.dart
+++ b/LanguageFeatures/nnbd/static_errors_A20_t01.dart
@@ -5,10 +5,10 @@
*/
/**
* @assertion It is a warning to use a null aware operator (?., ?.., ??, ??=,
- * or ...?) on a non-nullable receiver.
+ * or ...?) on an expression of type T if T is strictly non-nullable.
*
* @description Check it is a warning to use a null aware operator (?., ?.., ??,
- * ??=, or ...?) on a non-nullable receiver.
+ * ??=, or ...?) on a strictly non-nullable receiver.
* @author sgrekhov@unipro.ru
* @issue 39598
*/
diff --git a/LanguageFeatures/nnbd/static_errors_A20_t02.dart b/LanguageFeatures/nnbd/static_errors_A20_t02.dart
index c51529a..072b907 100644
--- a/LanguageFeatures/nnbd/static_errors_A20_t02.dart
+++ b/LanguageFeatures/nnbd/static_errors_A20_t02.dart
@@ -5,7 +5,7 @@
*/
/**
* @assertion It is a warning to use a null aware operator (?., ?.., ??, ??=,
- * or ...?) on a non-nullable receiver.
+ * or ...?) on an expression of type T if T is strictly non-nullable.
*
* @description Check it is no warning if null aware operators (?., ?.., ??,
* ??=, or ...?) are used on a nullable receiver.
diff --git a/LanguageFeatures/nnbd/static_errors_A20_t03.dart b/LanguageFeatures/nnbd/static_errors_A20_t03.dart
index df4ec5a..3fd7599 100644
--- a/LanguageFeatures/nnbd/static_errors_A20_t03.dart
+++ b/LanguageFeatures/nnbd/static_errors_A20_t03.dart
@@ -5,10 +5,10 @@
*/
/**
* @assertion It is a warning to use a null aware operator (?., ?.., ??, ??=,
- * or ...?) on a non-nullable receiver.
+ * or ...?) on an expression of type T if T is strictly non-nullable.
*
* @description Check it is a warning to use a null aware operator (?., ?.., ??,
- * ??=, or ...?) on a non-nullable receiver. Test type aliases
+ * ??=, or ...?) on a strictly non-nullable receiver. Test type aliases
* @author sgrekhov@unipro.ru
* @issue 39598
*/
diff --git a/LanguageFeatures/nnbd/static_errors_A20_t04.dart b/LanguageFeatures/nnbd/static_errors_A20_t04.dart
deleted file mode 100644
index 4c39a08..0000000
--- a/LanguageFeatures/nnbd/static_errors_A20_t04.dart
+++ /dev/null
@@ -1,27 +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 It is a warning to use a null aware operator (?., ?.., ??, ??=,
- * or ...?) on a non-nullable receiver.
- *
- * @description Check it is a warning to use a null aware operator (?., ?.., ??,
- * ??=, or ...?) on a non-nullable receiver. Test legacy pre-NNBD types
- * @author sgrekhov@unipro.ru
- * @issue 39598
- */
-// SharedOptions=--enable-experiment=non-nullable
-// Requirements=nnbd-strong
-import "legacy_lib.dart";
-
-main() {
- A a = A();
- a?.foo(); //# 01: static type warning
- a?..foo(); //# 02: static type warning
- a ?? new Object(); //# 03: static type warning
- a ??= new A(); //# 04: static type warning
- List<A> list = [A()];
- List<A> alist = [A(), A(), ...? list]; //# 05: static type warning
-}
diff --git a/LanguageFeatures/nnbd/static_errors_A20_t05.dart b/LanguageFeatures/nnbd/static_errors_A20_t05.dart
index e26536d..695791f 100644
--- a/LanguageFeatures/nnbd/static_errors_A20_t05.dart
+++ b/LanguageFeatures/nnbd/static_errors_A20_t05.dart
@@ -5,10 +5,10 @@
*/
/**
* @assertion It is a warning to use a null aware operator (?., ?.., ??, ??=,
- * or ...?) on a non-nullable receiver.
+ * or ...?) on an expression of type T if T is strictly non-nullable.
*
* @description Check it is a warning to use a null aware operator (?., ?.., ??,
- * ??=, or ...?) on a non-nullable receiver. Test Function type
+ * ??=, or ...?) on a strictly non-nullable receiver. Test Function type
* @author sgrekhov@unipro.ru
* @issue 39598
* @issue 39714
diff --git a/LanguageFeatures/nnbd/static_errors_A20_t06.dart b/LanguageFeatures/nnbd/static_errors_A20_t06.dart
index 8efc276..06fe910 100644
--- a/LanguageFeatures/nnbd/static_errors_A20_t06.dart
+++ b/LanguageFeatures/nnbd/static_errors_A20_t06.dart
@@ -5,10 +5,10 @@
*/
/**
* @assertion It is a warning to use a null aware operator (?., ?.., ??, ??=,
- * or ...?) on a non-nullable receiver.
+ * or ...?) on an expression of type T if T is strictly non-nullable.
*
* @description Check it is a warning to use a null aware operator (?., ?.., ??,
- * ??=, or ...?) on a non-nullable receiver. Test some function type
+ * ??=, or ...?) on a strictly non-nullable receiver. Test some function type
* @author sgrekhov@unipro.ru
* @issue 39598
* @issue 39714
diff --git a/LanguageFeatures/nnbd/static_errors_A20_t07.dart b/LanguageFeatures/nnbd/static_errors_A20_t07.dart
index 6d5847f..9919ccb 100644
--- a/LanguageFeatures/nnbd/static_errors_A20_t07.dart
+++ b/LanguageFeatures/nnbd/static_errors_A20_t07.dart
@@ -5,10 +5,10 @@
*/
/**
* @assertion It is a warning to use a null aware operator (?., ?.., ??, ??=,
- * or ...?) on a non-nullable receiver.
+ * or ...?) on an expression of type T if T is strictly non-nullable.
*
* @description Check it is a warning to use a null aware operator (?., ?.., ??,
- * ??=, or ...?) on a non-nullable receiver. Test <T extends Object>
+ * ??=, or ...?) on a strictly non-nullable receiver. Test <T extends Object>
* @author sgrekhov@unipro.ru
* @issue 39598
* @issue 39714
diff --git a/LanguageFeatures/nnbd/static_errors_A20_t08.dart b/LanguageFeatures/nnbd/static_errors_A20_t08.dart
index cd44c85..51e9d13 100644
--- a/LanguageFeatures/nnbd/static_errors_A20_t08.dart
+++ b/LanguageFeatures/nnbd/static_errors_A20_t08.dart
@@ -5,10 +5,10 @@
*/
/**
* @assertion It is a warning to use a null aware operator (?., ?.., ??, ??=,
- * or ...?) on a non-nullable receiver.
+ * or ...?) on an expression of type T if T is strictly non-nullable.
*
* @description Check it is a warning to use a null aware operator (?., ?.., ??,
- * ??=, or ...?) on a non-nullable receiver. Test FutureOr<Never>
+ * ??=, or ...?) on a strictly non-nullable receiver. Test FutureOr<Never>
* @author sgrekhov@unipro.ru
* @issue 39598
* @issue 39714
diff --git a/LanguageFeatures/nnbd/static_errors_A20_t09.dart b/LanguageFeatures/nnbd/static_errors_A20_t09.dart
index 8577d77..7acf0e6 100644
--- a/LanguageFeatures/nnbd/static_errors_A20_t09.dart
+++ b/LanguageFeatures/nnbd/static_errors_A20_t09.dart
@@ -5,10 +5,10 @@
*/
/**
* @assertion It is a warning to use a null aware operator (?., ?.., ??, ??=,
- * or ...?) on a non-nullable receiver.
+ * or ...?) on an expression of type T if T is strictly non-nullable.
*
* @description Check it is a warning to use a null aware operator (?., ?.., ??,
- * ??=, or ...?) on a non-nullable receiver. Test FutureOr<Function>
+ * ??=, or ...?) on a strictly non-nullable receiver. Test FutureOr<Function>
* @author sgrekhov@unipro.ru
* @issue 39598
* @issue 39714
diff --git a/LanguageFeatures/nnbd/static_errors_A20_t10.dart b/LanguageFeatures/nnbd/static_errors_A20_t10.dart
deleted file mode 100644
index 00820f2..0000000
--- a/LanguageFeatures/nnbd/static_errors_A20_t10.dart
+++ /dev/null
@@ -1,29 +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 It is a warning to use a null aware operator (?., ?.., ??, ??=,
- * or ...?) on a non-nullable receiver.
- *
- * @description Check it is a warning to use a null aware operator (?., ?.., ??,
- * ??=, or ...?) on a non-nullable receiver. Test FutureOr<A*>
- * @author sgrekhov@unipro.ru
- * @issue 39598
- * @issue 39714
- */
-// SharedOptions=--enable-experiment=non-nullable
-// Requirements=nnbd-strong
-import "dart:async";
-import "legacy_lib.dart";
-
-main() {
- FutureOr<A> a = new A();
- a?.toString(); //# 01: static type warning
- a?..toString(); //# 02: static type warning
- a ?? a; //# 03: static type warning
- a ??= a; //# 04: static type warning
- List<FutureOr<A>> clist = [a, a];
- List<FutureOr<A>> alist = [a, a, ...? clist]; //# 05: static type warning
-}
diff --git a/LanguageFeatures/nnbd/static_errors_A20_t11.dart b/LanguageFeatures/nnbd/static_errors_A20_t11.dart
index 3052ac6..8eb1061 100644
--- a/LanguageFeatures/nnbd/static_errors_A20_t11.dart
+++ b/LanguageFeatures/nnbd/static_errors_A20_t11.dart
@@ -5,10 +5,11 @@
*/
/**
* @assertion It is a warning to use a null aware operator (?., ?.., ??, ??=,
- * or ...?) on a non-nullable receiver.
+ * or ...?) on an expression of type T if T is strictly non-nullable.
*
* @description Check it is a warning to use a null aware operator (?., ?.., ??,
- * ??=, or ...?) on a non-nullable receiver. Test <T extends Object>
+ * ??=, or ...?) on a non-nullable receiver. Test FutureOr<T>, where
+ * <T extends Object>
* @author sgrekhov@unipro.ru
* @issue 39598
* @issue 39714
@@ -20,8 +21,8 @@
test<T extends Object>(FutureOr<T> t) {
t?.toString(); //# 01: static type warning
t?..toString(); //# 02: static type warning
- t ?? t; //# 03: static type warning
- t ??= t; //# 04: static type warning
+ t ?? t; //# 03: static type warning
+ t ??= t; //# 04: static type warning
List<FutureOr<T>> clist = [t, t];
List<FutureOr<T>> alist = [t, t, ...? clist]; //# 05: static type warning
}
diff --git a/LanguageFeatures/nnbd/static_errors_A20_t12.dart b/LanguageFeatures/nnbd/static_errors_A20_t12.dart
index bdeae70..839427c 100644
--- a/LanguageFeatures/nnbd/static_errors_A20_t12.dart
+++ b/LanguageFeatures/nnbd/static_errors_A20_t12.dart
@@ -5,10 +5,10 @@
*/
/**
* @assertion It is a warning to use a null aware operator (?., ?.., ??, ??=,
- * or ...?) on a non-nullable receiver.
+ * or ...?) on an expression of type T if T is strictly non-nullable.
*
* @description Check it is a warning to use a null aware operator (?., ?.., ??,
- * ??=, or ...?) on a non-nullable receiver. Test FutureOr<FutureOr<A>>
+ * ??=, or ...?) on a strictly non-nullable receiver. Test FutureOr<FutureOr<A>>
* @author sgrekhov@unipro.ru
* @issue 39598
* @issue 39714
diff --git a/LanguageFeatures/nnbd/static_errors_A20_t13.dart b/LanguageFeatures/nnbd/static_errors_A20_t13.dart
index a1028c1..e2de4ee 100644
--- a/LanguageFeatures/nnbd/static_errors_A20_t13.dart
+++ b/LanguageFeatures/nnbd/static_errors_A20_t13.dart
@@ -5,10 +5,10 @@
*/
/**
* @assertion It is a warning to use a null aware operator (?., ?.., ??, ??=,
- * or ...?) on a non-nullable receiver.
+ * or ...?) on an expression of type T if T is strictly non-nullable.
*
* @description Check it is a warning to use a null aware operator (?., ?.., ??,
- * ??=, or ...?) on a non-nullable receiver. Test if (t is Object) {…}
+ * ??=, or ...?) on a strictly non-nullable receiver. Test if (t is Object) {…}
* @author sgrekhov@unipro.ru
* @issue 39598
* @issue 39714
@@ -32,4 +32,4 @@
A? a = A();
C c = C();
test(a, c);
-}
\ No newline at end of file
+}
diff --git a/LanguageFeatures/nnbd/static_errors_A20_t14.dart b/LanguageFeatures/nnbd/static_errors_A20_t14.dart
index 4a297be..53f8ce8 100644
--- a/LanguageFeatures/nnbd/static_errors_A20_t14.dart
+++ b/LanguageFeatures/nnbd/static_errors_A20_t14.dart
@@ -5,10 +5,10 @@
*/
/**
* @assertion It is a warning to use a null aware operator (?., ?.., ??, ??=,
- * or ...?) on a non-nullable receiver.
+ * or ...?) on an expression of type T if T is strictly non-nullable.
*
* @description Check it is a warning to use a null aware operator (?., ?.., ??,
- * ??=, or ...?) on a non-nullable receiver. Test if (t != null) {…}
+ * ??=, or ...?) on a strictly non-nullable receiver. Test if (t != null) {…}
* @author sgrekhov@unipro.ru
* @issue 39598
* @issue 39714