Analyzer failures triaged. Some tests fixed, for some issue numbers added
diff --git a/LanguageFeatures/nnbd/list_length_t02.dart b/LanguageFeatures/nnbd/list_length_t02.dart
index 24a8c34..f51d909 100644
--- a/LanguageFeatures/nnbd/list_length_t02.dart
+++ b/LanguageFeatures/nnbd/list_length_t02.dart
@@ -29,7 +29,7 @@
main() {
test<A>(A(), A());
- test<LegacyFoo>(fLegacy1, fLegacy2);
+ test<LegacyFoo>(fLegacy2, fLegacy2);
test<FutureOr<A>>(A(), A());
test<FutureOr<LegacyFoo>>(fLegacy2, fLegacy2);
test<FutureOr<FutureOr<A>>>(A(), A());
diff --git a/LanguageFeatures/nnbd/list_length_t03.dart b/LanguageFeatures/nnbd/list_length_t03.dart
index 27e082d..8ac5d9b 100644
--- a/LanguageFeatures/nnbd/list_length_t03.dart
+++ b/LanguageFeatures/nnbd/list_length_t03.dart
@@ -11,7 +11,6 @@
* type E with an argument greater than the current length of the list is not a
* runtime error if E is subtype of Null
* @author sgrekhov@unipro.ru
- * @issue 39777
*/
// SharedOptions=--enable-experiment=non-nullable
import "dart:async";
diff --git a/LanguageFeatures/nnbd/list_length_t04.dart b/LanguageFeatures/nnbd/list_length_t04.dart
index b29cde8..ef25a07 100644
--- a/LanguageFeatures/nnbd/list_length_t04.dart
+++ b/LanguageFeatures/nnbd/list_length_t04.dart
@@ -11,7 +11,6 @@
* type E with an argument greater than the current length of the list is not a
* runtime error if E is subtype of Null
* @author sgrekhov@unipro.ru
- * @issue 39777
*/
// SharedOptions=--enable-experiment=non-nullable
import "legacy_lib.dart";
@@ -28,7 +27,7 @@
main() {
test<A?>(A(), A());
- test<LegacyFoo?>(fLegacy1, fLegacy2);
+ test<LegacyFoo?>(fLegacy2, fLegacy2);
test<FutureOr<A?>>(A(), A());
test<FutureOr<LegacyFoo?>>(fLegacy2, fLegacy2);
test<FutureOr<FutureOr<A?>>>(A(), A());
diff --git a/LanguageFeatures/nnbd/null_aware_operator_A11_t13.dart b/LanguageFeatures/nnbd/null_aware_operator_A11_t13.dart
index 83f8f6c..9805399 100644
--- a/LanguageFeatures/nnbd/null_aware_operator_A11_t13.dart
+++ b/LanguageFeatures/nnbd/null_aware_operator_A11_t13.dart
@@ -13,6 +13,7 @@
* PASSTHRU[F, fn[x] => x.f ??= EXP(e2)]
* @static-warning
* @author sgrekhov@unipro.ru
+ * @issue 39714
*/
// SharedOptions=--enable-experiment=non-nullable
import "../../Utils/expect.dart";
diff --git a/LanguageFeatures/nnbd/null_check_operator_A06_t02.dart b/LanguageFeatures/nnbd/null_check_operator_A06_t02.dart
index c92b12c..b270e87 100644
--- a/LanguageFeatures/nnbd/null_check_operator_A06_t02.dart
+++ b/LanguageFeatures/nnbd/null_check_operator_A06_t02.dart
@@ -13,6 +13,7 @@
* @author sgrekhov@unipro.ru
* @issue 39723
* @issue 39724
+ * @issue 39758
*/
// SharedOptions=--enable-experiment=non-nullable
import "../../Utils/expect.dart";
diff --git a/LanguageFeatures/nnbd/static_errors_A11_t02.dart b/LanguageFeatures/nnbd/static_errors_A11_t02.dart
index 78b5d15..4a41113 100644
--- a/LanguageFeatures/nnbd/static_errors_A11_t02.dart
+++ b/LanguageFeatures/nnbd/static_errors_A11_t02.dart
@@ -22,11 +22,5 @@
main() {
Null a = null;
a?.toString();
-// ^^^^^^^^
-// [analyzer] unspecified
-// [cfe] unspecified
a ?.. toString();
-// ^^^^^^^^
-// [analyzer] unspecified
-// [cfe] unspecified
}
diff --git a/LanguageFeatures/nnbd/static_errors_A11_t08.dart b/LanguageFeatures/nnbd/static_errors_A11_t08.dart
index 533b0af..d2e92e0 100644
--- a/LanguageFeatures/nnbd/static_errors_A11_t08.dart
+++ b/LanguageFeatures/nnbd/static_errors_A11_t08.dart
@@ -14,6 +14,7 @@
* is T, then the operator is checked as if the receiver had type NonNull(T).
* Test some type A*, where A is nullable
* @issue 38715
+ * "шыыгу 39865
* @author sgrekhov@unipro.ru
*/
// SharedOptions=--enable-experiment=non-nullable
diff --git a/LanguageFeatures/nnbd/static_errors_A11_t13.dart b/LanguageFeatures/nnbd/static_errors_A11_t13.dart
index dcfab9f..865f843 100644
--- a/LanguageFeatures/nnbd/static_errors_A11_t13.dart
+++ b/LanguageFeatures/nnbd/static_errors_A11_t13.dart
@@ -22,13 +22,10 @@
import "dart:async";
class A {
- void test() {}
- int operator[](int index) => 0;
}
main() {
FutureOr<A> a = new A();
a?.toString(); /// static type warning
a ?.. toString(); /// static type warning
- a?.[0]; /// static type warning
}
diff --git a/LanguageFeatures/nnbd/static_errors_A13_t01.dart b/LanguageFeatures/nnbd/static_errors_A13_t01.dart
index 7e91c23..f8735f5 100644
--- a/LanguageFeatures/nnbd/static_errors_A13_t01.dart
+++ b/LanguageFeatures/nnbd/static_errors_A13_t01.dart
@@ -4,53 +4,30 @@
* BSD-style license that can be found in the LICENSE file.
*/
/**
- * @assertion It is an error to call a method, setter, or getter on a receiver
- * of static type Never (including via a null aware operator).
+ * @assertion It is not an error to call or tear-off a method, setter, or
+ * getter, or to read or write a field, on a receiver of static type Never.
+ * Implementations that provide feedback about dead or unreachable code are
+ * encouraged to indicate that any arguments to the invocation are unreachable.
*
- * @description Check that it is an error to call a method, setter, or getter on
- * a receiver of static type Never (including via a null aware operator).
+ * @description Check that it is тще an error to call a method, setter, or
+ * getter on a receiver of static type Never (including via a null aware
+ * operator).
* @author sgrekhov@unipro.ru
+ * @issue 39866
*/
// SharedOptions=--enable-experiment=non-nullable
// Requirements=nnbd-strong
void test(var x) {
if (x is Never) {
x.toString();
-// ^^^^^^^^
-// [analyzer] unspecified
-// [cfe] unspecified
x.runtimeType;
-// ^^^^^^^^^^^
-// [analyzer] unspecified
-// [cfe] unspecified
x.s = 1;
-// ^^
-// [analyzer] unspecified
-// [cfe] unspecified
x?.toString();
-// ^^^^^^^^
-// [analyzer] unspecified
-// [cfe] unspecified
x?.runtimeType;
-// ^^^^^^^^^^^
-// [analyzer] unspecified
-// [cfe] unspecified
x?.s = 1;
-// ^^
-// [analyzer] unspecified
-// [cfe] unspecified
x?..toString();
-// ^^^^^^^^
-// [analyzer] unspecified
-// [cfe] unspecified
x?..runtimeType;
-// ^^^^^^^^^^^
-// [analyzer] unspecified
-// [cfe] unspecified
x?..s = 1;
-// ^^^
-// [analyzer] unspecified
-// [cfe] unspecified
}
}
diff --git a/LanguageFeatures/nnbd/static_errors_A13_t02.dart b/LanguageFeatures/nnbd/static_errors_A13_t02.dart
index bc417d5..b88bc13 100644
--- a/LanguageFeatures/nnbd/static_errors_A13_t02.dart
+++ b/LanguageFeatures/nnbd/static_errors_A13_t02.dart
@@ -11,6 +11,7 @@
* a receiver of static type Never (including via a null aware operator). Test
* type aliases
* @author sgrekhov@unipro.ru
+ * @issue 39866
*/
// SharedOptions=--enable-experiment=non-nullable,nonfunction-type-aliases
// Requirements=nnbd-strong
@@ -19,41 +20,14 @@
void test(var x) {
if (x is Neverland) {
x.toString();
-// ^^^^^^^^
-// [analyzer] unspecified
-// [cfe] unspecified
x.runtimeType;
-// ^^^^^^^^^^^
-// [analyzer] unspecified
-// [cfe] unspecified
x.s = 1;
-// ^^
-// [analyzer] unspecified
-// [cfe] unspecified
x?.toString();
-// ^^^^^^^^
-// [analyzer] unspecified
-// [cfe] unspecified
x?.runtimeType;
-// ^^^^^^^^^^^
-// [analyzer] unspecified
-// [cfe] unspecified
x?.s = 1;
-// ^^
-// [analyzer] unspecified
-// [cfe] unspecified
x?..toString();
-// ^^^^^^^^
-// [analyzer] unspecified
-// [cfe] unspecified
x?..runtimeType;
-// ^^^^^^^^^^^
-// [analyzer] unspecified
-// [cfe] unspecified
x?..s = 1;
-// ^^^
-// [analyzer] unspecified
-// [cfe] unspecified
}
}
diff --git a/LanguageFeatures/nnbd/static_errors_A14_t01.dart b/LanguageFeatures/nnbd/static_errors_A14_t01.dart
index c862900..d1d3686 100644
--- a/LanguageFeatures/nnbd/static_errors_A14_t01.dart
+++ b/LanguageFeatures/nnbd/static_errors_A14_t01.dart
@@ -4,12 +4,13 @@
* BSD-style license that can be found in the LICENSE file.
*/
/**
- * @assertion It is an error to apply an expression of type Never in the
- * function position of a function call.
+ * @assertion It is not an error to apply an expression of type Never in the
+ * function position of a function call
*
- * @description Check that it is an error to apply an expression of type Never
- * in the function position of a function call.
+ * @description Check that it isnot an error to apply an expression of type
+ * Never in the function position of a function call.
* @author sgrekhov@unipro.ru
+ * @issue 39866
*/
// SharedOptions=--enable-experiment=non-nullable
// Requirements=nnbd-strong
@@ -17,17 +18,8 @@
void test(var x) {
if (x is Never) {
x();
-// ^
-// [analyzer] unspecified
-// [cfe] unspecified
x(1);
-// ^
-// [analyzer] unspecified
-// [cfe] unspecified
x("1");
-// ^
-// [analyzer] unspecified
-// [cfe] unspecified
}
}
diff --git a/LanguageFeatures/nnbd/static_errors_A14_t02.dart b/LanguageFeatures/nnbd/static_errors_A14_t02.dart
index 7e001d5..e91765e 100644
--- a/LanguageFeatures/nnbd/static_errors_A14_t02.dart
+++ b/LanguageFeatures/nnbd/static_errors_A14_t02.dart
@@ -10,6 +10,7 @@
* @description Check that it is an error to apply an expression of type Never
* in the function position of a function call. Test type aliases
* @author sgrekhov@unipro.ru
+ * @issue 39866
*/
// SharedOptions=--enable-experiment=non-nullable,nonfunction-type-aliases
// Requirements=nnbd-strong
@@ -18,17 +19,8 @@
void test(var x) {
if (x is Neverland) {
x();
-// ^
-// [analyzer] unspecified
-// [cfe] unspecified
x(1);
-// ^
-// [analyzer] unspecified
-// [cfe] unspecified
x("1");
-// ^
-// [analyzer] unspecified
-// [cfe] unspecified
}
}
diff --git a/LanguageFeatures/nnbd/static_errors_A20_t05.dart b/LanguageFeatures/nnbd/static_errors_A20_t05.dart
index 19f9482..0c70a08 100644
--- a/LanguageFeatures/nnbd/static_errors_A20_t05.dart
+++ b/LanguageFeatures/nnbd/static_errors_A20_t05.dart
@@ -11,6 +11,7 @@
* ??=, or ...?) on a non-nullable receiver. Test Function type
* @author sgrekhov@unipro.ru
* @issue 39598
+ * @issue 39714
*/
// SharedOptions=--enable-experiment=non-nullable
void foo() {}
diff --git a/LanguageFeatures/nnbd/static_errors_A20_t06.dart b/LanguageFeatures/nnbd/static_errors_A20_t06.dart
index 7410388..9068030 100644
--- a/LanguageFeatures/nnbd/static_errors_A20_t06.dart
+++ b/LanguageFeatures/nnbd/static_errors_A20_t06.dart
@@ -11,6 +11,7 @@
* ??=, or ...?) on a non-nullable receiver. Test some function type
* @author sgrekhov@unipro.ru
* @issue 39598
+ * @issue 39714
*/
// SharedOptions=--enable-experiment=non-nullable
void foo() {}
diff --git a/LanguageFeatures/nnbd/static_errors_A20_t07.dart b/LanguageFeatures/nnbd/static_errors_A20_t07.dart
index 0d23038..9ffc849 100644
--- a/LanguageFeatures/nnbd/static_errors_A20_t07.dart
+++ b/LanguageFeatures/nnbd/static_errors_A20_t07.dart
@@ -11,6 +11,7 @@
* ??=, or ...?) on a non-nullable receiver. Test <T extends Object>
* @author sgrekhov@unipro.ru
* @issue 39598
+ * @issue 39714
*/
// SharedOptions=--enable-experiment=non-nullable
diff --git a/LanguageFeatures/nnbd/static_errors_A20_t08.dart b/LanguageFeatures/nnbd/static_errors_A20_t08.dart
index 06a8bdc..646f4e7 100644
--- a/LanguageFeatures/nnbd/static_errors_A20_t08.dart
+++ b/LanguageFeatures/nnbd/static_errors_A20_t08.dart
@@ -11,6 +11,7 @@
* ??=, or ...?) on a non-nullable receiver. Test FutureOr<Never>
* @author sgrekhov@unipro.ru
* @issue 39598
+ * @issue 39714
*/
// SharedOptions=--enable-experiment=non-nullable
import "dart:async";
diff --git a/LanguageFeatures/nnbd/static_errors_A20_t09.dart b/LanguageFeatures/nnbd/static_errors_A20_t09.dart
index 5cb4685..6b7eba7 100644
--- a/LanguageFeatures/nnbd/static_errors_A20_t09.dart
+++ b/LanguageFeatures/nnbd/static_errors_A20_t09.dart
@@ -11,6 +11,7 @@
* ??=, or ...?) on a non-nullable receiver. Test FutureOr<Function>
* @author sgrekhov@unipro.ru
* @issue 39598
+ * @issue 39714
*/
// SharedOptions=--enable-experiment=non-nullable
import "dart:async";
diff --git a/LanguageFeatures/nnbd/static_errors_A20_t10.dart b/LanguageFeatures/nnbd/static_errors_A20_t10.dart
index 770c5df..41905c8 100644
--- a/LanguageFeatures/nnbd/static_errors_A20_t10.dart
+++ b/LanguageFeatures/nnbd/static_errors_A20_t10.dart
@@ -11,6 +11,7 @@
* ??=, or ...?) on a non-nullable receiver. Test FutureOr<A*>
* @author sgrekhov@unipro.ru
* @issue 39598
+ * @issue 39714
*/
// SharedOptions=--enable-experiment=non-nullable
import "dart:async";
diff --git a/LanguageFeatures/nnbd/static_errors_A20_t11.dart b/LanguageFeatures/nnbd/static_errors_A20_t11.dart
index 44e178d..a893eda 100644
--- a/LanguageFeatures/nnbd/static_errors_A20_t11.dart
+++ b/LanguageFeatures/nnbd/static_errors_A20_t11.dart
@@ -11,6 +11,7 @@
* ??=, or ...?) on a non-nullable receiver. Test <T extends Object>
* @author sgrekhov@unipro.ru
* @issue 39598
+ * @issue 39714
*/
// SharedOptions=--enable-experiment=non-nullable
import "dart:async";
diff --git a/LanguageFeatures/nnbd/static_errors_A20_t12.dart b/LanguageFeatures/nnbd/static_errors_A20_t12.dart
index 222f2b1..f016370 100644
--- a/LanguageFeatures/nnbd/static_errors_A20_t12.dart
+++ b/LanguageFeatures/nnbd/static_errors_A20_t12.dart
@@ -11,6 +11,7 @@
* ??=, or ...?) on a non-nullable receiver. Test FutureOr<FutureOr<A>>
* @author sgrekhov@unipro.ru
* @issue 39598
+ * @issue 39714
*/
// SharedOptions=--enable-experiment=non-nullable
import "dart:async";
diff --git a/LanguageFeatures/nnbd/static_errors_A20_t14.dart b/LanguageFeatures/nnbd/static_errors_A20_t14.dart
index a2c9d0a..5a6d9eb 100644
--- a/LanguageFeatures/nnbd/static_errors_A20_t14.dart
+++ b/LanguageFeatures/nnbd/static_errors_A20_t14.dart
@@ -11,6 +11,7 @@
* ??=, or ...?) on a non-nullable receiver. Test if (t != null) {…}
* @author sgrekhov@unipro.ru
* @issue 39598
+ * @issue 39714
*/
// SharedOptions=--enable-experiment=non-nullable
class A {
diff --git a/LanguageFeatures/nnbd/static_errors_A27_t06.dart b/LanguageFeatures/nnbd/static_errors_A27_t06.dart
index 618f83d..76896be 100644
--- a/LanguageFeatures/nnbd/static_errors_A27_t06.dart
+++ b/LanguageFeatures/nnbd/static_errors_A27_t06.dart
@@ -11,6 +11,7 @@
* a non-nullable expression. Test if (t is Object) {…}
* @author sgrekhov@unipro.ru
* @issue 39598
+ * @issue 39867
*/
// SharedOptions=--enable-experiment=non-nullable
diff --git a/LanguageFeatures/nnbd/static_errors_A27_t07.dart b/LanguageFeatures/nnbd/static_errors_A27_t07.dart
index bffc645..2877a5b 100644
--- a/LanguageFeatures/nnbd/static_errors_A27_t07.dart
+++ b/LanguageFeatures/nnbd/static_errors_A27_t07.dart
@@ -11,6 +11,7 @@
* a non-nullable expression. Test if (t != null) {…}
* @author sgrekhov@unipro.ru
* @issue 39598
+ * @issue 39867
*/
// SharedOptions=--enable-experiment=non-nullable