Fixed numerous errors in the tests migrated to NNBD
diff --git a/Language/Enums/syntax_t09.dart b/Language/Enums/syntax_t09.dart
index d2cda00..29acfc2 100644
--- a/Language/Enums/syntax_t09.dart
+++ b/Language/Enums/syntax_t09.dart
@@ -9,17 +9,14 @@
* enumType:
* metadata enum id ‘{’ id [‘, ’ id]* [‘, ’] ‘}’
* ;
- * @description Checks that it is no compile error if enum has more then one
+ * @description Checks that it is a compile error if enum has more then one
* comma in the end of member list.
- * @static-clean
+ * @compile-error
* @author ngl@unipro.ru
*/
-import "../../Utils/expect.dart";
-
enum E {a, b,, }
main() {
E e = E.b;
- Expect.equals(e, E.b);
}
diff --git a/Language/Expressions/Constants/depending_on_itself_t02.dart b/Language/Expressions/Constants/depending_on_itself_t02.dart
index a4ed003..1b158b5 100644
--- a/Language/Expressions/Constants/depending_on_itself_t02.dart
+++ b/Language/Expressions/Constants/depending_on_itself_t02.dart
@@ -23,7 +23,4 @@
const a10 = a9; //# 10: compile-time error
main() {
- try {
- print(a10);
- } catch (x) {}
}
diff --git a/Language/Expressions/Instance_Creation/Const/parameterized_type_t01.dart b/Language/Expressions/Instance_Creation/Const/parameterized_type_t01.dart
index d9aa6d0..dff3819 100644
--- a/Language/Expressions/Instance_Creation/Const/parameterized_type_t01.dart
+++ b/Language/Expressions/Instance_Creation/Const/parameterized_type_t01.dart
@@ -9,7 +9,7 @@
* const T(a1, ..., an, xn+1: an+1, ..., xn+k: an+k).
* If T is a parameterized type, it is a compile-time error if T includes
* a type variable among its type arguments.
- * @description Checks that it is no error if T includes any type parameters as
+ * @description Checks that it is an error if T includes any type parameters as
* a type argument.
* @issue 27492
* @author msyabro
@@ -22,6 +22,9 @@
class A<T> {
test() {
const S<T>(); //type variable as a type argument
+// ^
+// [analyzer]unspecified
+// [cfe]unspecified
}
}
diff --git a/Language/Expressions/Instance_Creation/Const/parameterized_type_t02.dart b/Language/Expressions/Instance_Creation/Const/parameterized_type_t02.dart
index 1ddffa3..74b0e5b 100644
--- a/Language/Expressions/Instance_Creation/Const/parameterized_type_t02.dart
+++ b/Language/Expressions/Instance_Creation/Const/parameterized_type_t02.dart
@@ -9,7 +9,7 @@
* const T(a1, .., an, xn+1: an+1, …, xn+k: an+k).
* If T is a parameterized type, it is a compile-time error if T includes
* a type variable among its type arguments.
- * @description Checks that it is no error if T includes any type parameters as
+ * @description Checks that it is an error if T includes any type parameters as
* a type argument.
* @issue 27492
* @author kaigorodov
@@ -22,6 +22,9 @@
class A<T> {
test() {
const S<T>.named(); //type variable as a type argument
+// ^
+// [analyzer]unspecified
+// [cfe]unspecified
}
}
diff --git a/Language/Expressions/Instance_Creation/New/syntax_t04.dart b/Language/Expressions/Instance_Creation/New/syntax_t04.dart
index 9b491ab..d62f8c7 100644
--- a/Language/Expressions/Instance_Creation/New/syntax_t04.dart
+++ b/Language/Expressions/Instance_Creation/New/syntax_t04.dart
@@ -10,7 +10,6 @@
* ;
* @description Checks that if a constructor is invoked without new (or const)
* keyword, it is not considered as a (malformed) method invocation now.
- * @compile-error
* @author msyabro
*/
diff --git a/Language/Expressions/Lists/constant_list_t01.dart b/Language/Expressions/Lists/constant_list_t01.dart
index 1914a0d..dcea0e0 100644
--- a/Language/Expressions/Lists/constant_list_t01.dart
+++ b/Language/Expressions/Lists/constant_list_t01.dart
@@ -7,18 +7,21 @@
* @assertion It is a compile time error if an element of a constant list
* literal is not a compile-time constant. It is a compile time error if the
* type argument of a constant list literal includes a type parameter.
- * @description Checks that it is no error if the type argument of a constant
+ * @description Checks that it is an error if the type argument of a constant
* list literal includes a type variable.
* @Issue 27492
* @author msyabro
*/
class C<T> {
- test() {
- const <T?>[null, null];
+ test(T t) {
+ const <T>[t, t];
+// ^
+// [analyzer]unspecified
+// [cfe]unspecified
}
}
main() {
- new C().test();
+ new C<String>().test("");
}
diff --git a/Language/Expressions/Maps/constant_map_type_t01.dart b/Language/Expressions/Maps/constant_map_type_t01.dart
index a1d32a9..d93866a 100644
--- a/Language/Expressions/Maps/constant_map_type_t01.dart
+++ b/Language/Expressions/Maps/constant_map_type_t01.dart
@@ -6,7 +6,7 @@
/**
* @assertion It is a compile time error if the type argument of a
* constant map literal includes a type parameter.
- * @description Checks that it is no error if if the type argument of a
+ * @description Checks that it is an error if if the type argument of a
* constant map literal includes a type variable.
* @issue 27492
* @author msyabro
@@ -14,7 +14,10 @@
class C<T> {
test() {
- const <String, T> {"1": null};
+ const <String, T> {};
+// ^
+// [analyzer]unspecified
+// [cfe]unspecified
}
}