#389. More NNBD static errors tests added
diff --git a/LanguageFeatures/nnbd/static_errors_A01_t01.dart b/LanguageFeatures/nnbd/static_errors_A01_t01.dart
index ffe362a..ac28c33 100644
--- a/LanguageFeatures/nnbd/static_errors_A01_t01.dart
+++ b/LanguageFeatures/nnbd/static_errors_A01_t01.dart
@@ -7,6 +7,7 @@
* @assertion It is an error to call a method, setter, getter or operator on
* an expression whose type is potentially nullable and not dynamic, except for
* the methods, setters, getters, and operators on Object.
+ *
* @description Check that it is a compile-time error to call a method, setter,
* getter or operator on an expression whose type is potentially nullable.
* @author sgrekhov@unipro.ru
diff --git a/LanguageFeatures/nnbd/static_errors_A01_t02.dart b/LanguageFeatures/nnbd/static_errors_A01_t02.dart
index f578889..dea75b4 100644
--- a/LanguageFeatures/nnbd/static_errors_A01_t02.dart
+++ b/LanguageFeatures/nnbd/static_errors_A01_t02.dart
@@ -7,6 +7,7 @@
* @assertion It is an error to call a method, setter, getter or operator on
* an expression whose type is potentially nullable and not dynamic, except for
* the methods, setters, getters, and operators on Object.
+ *
* @description Check that it is no compile-time error to call a method, setter,
* getter or operator on an expression whose type is potentially nullable if
* they are methods, setters, getters, and operators on Object
diff --git a/LanguageFeatures/nnbd/static_errors_A01_t03.dart b/LanguageFeatures/nnbd/static_errors_A01_t03.dart
index 5ed864b..9a5b621 100644
--- a/LanguageFeatures/nnbd/static_errors_A01_t03.dart
+++ b/LanguageFeatures/nnbd/static_errors_A01_t03.dart
@@ -7,6 +7,7 @@
* @assertion It is an error to call a method, setter, getter or operator on
* an expression whose type is potentially nullable and not dynamic, except for
* the methods, setters, getters, and operators on Object.
+ *
* @description Check that it is no compile-time error to call a method, setter,
* getter or operator on an expression whose type is dynamic
* @author sgrekhov@unipro.ru
diff --git a/LanguageFeatures/nnbd/static_errors_A02_t01.dart b/LanguageFeatures/nnbd/static_errors_A02_t01.dart
index 1a3c12e..ba69ba4 100644
--- a/LanguageFeatures/nnbd/static_errors_A02_t01.dart
+++ b/LanguageFeatures/nnbd/static_errors_A02_t01.dart
@@ -7,6 +7,7 @@
* @assertion It is an error to read a field or tear off a method from an
* expression whose type is potentially nullable and not dynamic, except for the
* methods and fields on Object.
+ *
* @description Check that it is a compile-time error to read a field or tear
* off a method from an expression whose type is potentially nullable and not
* dynamic
diff --git a/LanguageFeatures/nnbd/static_errors_A02_t02.dart b/LanguageFeatures/nnbd/static_errors_A02_t02.dart
index de70e0c..c2ba2a8 100644
--- a/LanguageFeatures/nnbd/static_errors_A02_t02.dart
+++ b/LanguageFeatures/nnbd/static_errors_A02_t02.dart
@@ -7,6 +7,7 @@
* @assertion It is an error to read a field or tear off a method from an
* expression whose type is potentially nullable and not dynamic, except for the
* methods and fields on Object.
+ *
* @description Check that it is no compile-time error to read a field or tear
* off a method from an expression whose type is potentially nullable but type
* dynamic
diff --git a/LanguageFeatures/nnbd/static_errors_A02_t03.dart b/LanguageFeatures/nnbd/static_errors_A02_t03.dart
index 89ddbe3..fef7616 100644
--- a/LanguageFeatures/nnbd/static_errors_A02_t03.dart
+++ b/LanguageFeatures/nnbd/static_errors_A02_t03.dart
@@ -7,6 +7,7 @@
* @assertion It is an error to read a field or tear off a method from an
* expression whose type is potentially nullable and not dynamic, except for the
* methods and fields on Object.
+ *
* @description Check that it is no compile-time error to read a field or tear
* off a method from an expression whose type is dynamic
* @author sgrekhov@unipro.ru
diff --git a/LanguageFeatures/nnbd/static_errors_A03_t01.dart b/LanguageFeatures/nnbd/static_errors_A03_t01.dart
index e64d1ef..dc9435c 100644
--- a/LanguageFeatures/nnbd/static_errors_A03_t01.dart
+++ b/LanguageFeatures/nnbd/static_errors_A03_t01.dart
@@ -6,6 +6,7 @@
/**
* @assertion It is an error to call an expression whose type is potentially
* nullable and not dynamic.
+ *
* @description Check that it is a compile-time error to call an expression
* whose type is potentially nullable and not dynamic.
* @author sgrekhov@unipro.ru
diff --git a/LanguageFeatures/nnbd/static_errors_A04_t01.dart b/LanguageFeatures/nnbd/static_errors_A04_t01.dart
index d7fd4c2..f274ff4 100644
--- a/LanguageFeatures/nnbd/static_errors_A04_t01.dart
+++ b/LanguageFeatures/nnbd/static_errors_A04_t01.dart
@@ -9,6 +9,7 @@
* expression and is not initialized in a constructor via an initializing formal
* or an initializer list entry, unless the variable or field is marked with the
* 'late' modifier.
+ *
* @description Check that it is a compile-time error if a top level variable
* with potentially non-nullable type has no initializer expression
* @author sgrekhov@unipro.ru
diff --git a/LanguageFeatures/nnbd/static_errors_A04_t02.dart b/LanguageFeatures/nnbd/static_errors_A04_t02.dart
index bb607c9..0e4fb0b 100644
--- a/LanguageFeatures/nnbd/static_errors_A04_t02.dart
+++ b/LanguageFeatures/nnbd/static_errors_A04_t02.dart
@@ -9,6 +9,7 @@
* expression and is not initialized in a constructor via an initializing formal
* or an initializer list entry, unless the variable or field is marked with the
* 'late' modifier.
+ *
* @description Check that it is a compile-time error if a static variable
* with potentially non-nullable type has no initializer expression
* @author sgrekhov@unipro.ru
diff --git a/LanguageFeatures/nnbd/static_errors_A04_t03.dart b/LanguageFeatures/nnbd/static_errors_A04_t03.dart
index 5946de3..2f1b678 100644
--- a/LanguageFeatures/nnbd/static_errors_A04_t03.dart
+++ b/LanguageFeatures/nnbd/static_errors_A04_t03.dart
@@ -9,6 +9,7 @@
* expression and is not initialized in a constructor via an initializing formal
* or an initializer list entry, unless the variable or field is marked with the
* 'late' modifier.
+ *
* @description Check that it is a compile-time error if an instance field
* with potentially non-nullable type has no initializer expression
* @compile-error
diff --git a/LanguageFeatures/nnbd/static_errors_A04_t04.dart b/LanguageFeatures/nnbd/static_errors_A04_t04.dart
index a4cb232..86e5f96 100644
--- a/LanguageFeatures/nnbd/static_errors_A04_t04.dart
+++ b/LanguageFeatures/nnbd/static_errors_A04_t04.dart
@@ -9,6 +9,7 @@
* expression and is not initialized in a constructor via an initializing formal
* or an initializer list entry, unless the variable or field is marked with the
* 'late' modifier.
+ *
* @description Check that it is no compile-time error if a top level variable
* with potentially non-nullable type has no initializer expression but this
* variable is marked with the 'late' modifier
diff --git a/LanguageFeatures/nnbd/static_errors_A04_t05.dart b/LanguageFeatures/nnbd/static_errors_A04_t05.dart
index 532f4af..259b5f6 100644
--- a/LanguageFeatures/nnbd/static_errors_A04_t05.dart
+++ b/LanguageFeatures/nnbd/static_errors_A04_t05.dart
@@ -9,6 +9,7 @@
* expression and is not initialized in a constructor via an initializing formal
* or an initializer list entry, unless the variable or field is marked with the
* 'late' modifier.
+ *
* @description Check that it is no compile-time error if a static variable
* with potentially non-nullable type has no initializer expression but marked
* with the 'late' modifier
diff --git a/LanguageFeatures/nnbd/static_errors_A04_t06.dart b/LanguageFeatures/nnbd/static_errors_A04_t06.dart
index 05f8011..30cf747 100644
--- a/LanguageFeatures/nnbd/static_errors_A04_t06.dart
+++ b/LanguageFeatures/nnbd/static_errors_A04_t06.dart
@@ -9,6 +9,7 @@
* expression and is not initialized in a constructor via an initializing formal
* or an initializer list entry, unless the variable or field is marked with the
* 'late' modifier.
+ *
* @description Check that it is no compile-time error if an instance field
* with potentially non-nullable type has no initializer expression but marked
* with the 'late' modifier
diff --git a/LanguageFeatures/nnbd/static_errors_A07_t01.dart b/LanguageFeatures/nnbd/static_errors_A07_t01.dart
index dc0e2cc..ebaafbd 100644
--- a/LanguageFeatures/nnbd/static_errors_A07_t01.dart
+++ b/LanguageFeatures/nnbd/static_errors_A07_t01.dart
@@ -6,6 +6,7 @@
/**
* @assertion It is an error if an optional parameter (named or otherwise) with
* no default value has a potentially non-nullable type.
+ *
* @description Check that it is a compile-time error if an optional parameter
* (named or otherwise) with no default value has a potentially non-nullable
* type.
diff --git a/LanguageFeatures/nnbd/static_errors_A08_t01.dart b/LanguageFeatures/nnbd/static_errors_A08_t01.dart
new file mode 100644
index 0000000..44adadf
--- /dev/null
+++ b/LanguageFeatures/nnbd/static_errors_A08_t01.dart
@@ -0,0 +1,30 @@
+/*
+ * 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 an error if a required named parameter has a default value.
+ *
+ * @description Check that it is an error if a required named parameter has a
+ * default value.
+ * @author sgrekhov@unipro.ru
+ */
+// SharedOptions=--enable-experiment=non-nullable
+
+class C {
+ static void test1(int x = 0) {} //# 01: compile-time error
+ static void test2(int x = 0, [String s = ""]) {} //# 02: compile-time error
+ static void test3(int x = 0, {String s = ""}) {} //# 03: compile-time error
+
+ void test4(int x = 0) {} //# 04: compile-time error
+ void test5(int x = 0, [String s = ""]) {} //# 05: compile-time error
+ void test6(int x = 0, {String s = ""}) {} //# 06: compile-time error
+}
+
+void test7(int x = 0) {} //# 07: compile-time error
+void test8(int x = 0, [String s = ""]) {} //# 08: compile-time error
+void test9(int x = 0, {String s = ""}) {} //# 09: compile-time error
+
+main() {
+}
diff --git a/LanguageFeatures/nnbd/static_errors_A08_t02.dart b/LanguageFeatures/nnbd/static_errors_A08_t02.dart
new file mode 100644
index 0000000..a9d62fe
--- /dev/null
+++ b/LanguageFeatures/nnbd/static_errors_A08_t02.dart
@@ -0,0 +1,35 @@
+/*
+ * 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 an error if a required named parameter has a default value.
+ *
+ * @description Check that it is an error if a required named parameter has a
+ * default value.
+ * @author sgrekhov@unipro.ru
+ */
+// SharedOptions=--enable-experiment=non-nullable
+class A {
+ const A();
+}
+
+const a = const A();
+
+class C {
+ static void test1(A x = a) {} //# 01: compile-time error
+ static void test2(A x = a, [String s = ""]) {} //# 02: compile-time error
+ static void test3(A x = a, {String s = ""}) {} //# 03: compile-time error
+
+ void test4(A x = a) {} //# 04: compile-time error
+ void test5(A x = a, [String s = ""]) {} //# 05: compile-time error
+ void test6(A x = a, {String s = ""}) {} //# 06: compile-time error
+}
+
+void test7(A x = a) {} //# 07: compile-time error
+void test8(A x = a, [String s = ""]) {} //# 08: compile-time error
+void test9(A x = a, {String s = ""}) {} //# 09: compile-time error
+
+main() {
+}
diff --git a/LanguageFeatures/nnbd/static_errors_A09_t01.dart b/LanguageFeatures/nnbd/static_errors_A09_t01.dart
new file mode 100644
index 0000000..47e0d17
--- /dev/null
+++ b/LanguageFeatures/nnbd/static_errors_A09_t01.dart
@@ -0,0 +1,28 @@
+/*
+ * 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 an error if a named parameter that is part of a required
+ * group is not bound to an argument at a call site
+ *
+ * @description Check that it is an error if a named parameter that is part of a
+ * required group is not bound to an argument at a call site
+ * @author sgrekhov@unipro.ru
+ */
+// SharedOptions=--enable-experiment=non-nullable
+import "package:meta/meta.dart";
+
+class C {
+ static void test1({@required int x}) {}
+ void test2({@required int x = 0}) {}
+}
+
+void test3({@required int x = 0}) {}
+
+main() {
+ C.test1(); //# 01: compile-time error
+ C().test2(); //# 02: compile-time error
+ test3(); //# 03: compile-time error
+}
diff --git a/LanguageFeatures/nnbd/static_errors_A10_t01.dart b/LanguageFeatures/nnbd/static_errors_A10_t01.dart
new file mode 100644
index 0000000..586f490
--- /dev/null
+++ b/LanguageFeatures/nnbd/static_errors_A10_t01.dart
@@ -0,0 +1,28 @@
+/*
+ * 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 an error if a named parameter that is part of a required
+ * group is not bound to an argument at a call site
+ *
+ * @description Check that it is an error if a named parameter that is part of a
+ * required group is not bound to an argument at a call site
+ * @author sgrekhov@unipro.ru
+ */
+// SharedOptions=--enable-experiment=non-nullable
+import "package:meta/meta.dart";
+
+class C {
+ static void test1({@required int x, String y}) {}
+ void test2({@required int x = 0, String y}) {}
+}
+
+void test3({@required int x = 0, String y}) {}
+
+main() {
+ C.test1(y: ""); //# 01: compile-time error
+ C().test2(y: ""); //# 02: compile-time error
+ test3(y: ""); //# 03: compile-time error
+}