#389. More NNBD static errors tests added
diff --git a/LanguageFeatures/nnbd/static_errors_A03_t01.dart b/LanguageFeatures/nnbd/static_errors_A03_t01.dart
new file mode 100644
index 0000000..e64d1ef
--- /dev/null
+++ b/LanguageFeatures/nnbd/static_errors_A03_t01.dart
@@ -0,0 +1,36 @@
+/*
+ * 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 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
+ */
+// SharedOptions=--enable-experiment=non-nullable
+
+class A {
+}
+
+class C<X extends A?> {
+ X x;
+ C(this.x);
+
+ X get xgetter => x;
+ X method() => x;
+
+ test() {
+ this.x; //# 01: compile-time error
+ this.xgetter; //# 02: compile-time error
+ this.method(); //# 03: compile-time error
+ }
+}
+
+main() {
+ A? a = new A();
+ C<A?> c = new C<A?>(a);
+ c.test();
+}
diff --git a/LanguageFeatures/nnbd/static_errors_A04_t01.dart b/LanguageFeatures/nnbd/static_errors_A04_t01.dart
new file mode 100644
index 0000000..d7fd4c2
--- /dev/null
+++ b/LanguageFeatures/nnbd/static_errors_A04_t01.dart
@@ -0,0 +1,26 @@
+/*
+ * 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 top level variable, static variable, or
+ * instance field with potentially non-nullable type has no initializer
+ * 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
+ */
+// SharedOptions=--enable-experiment=non-nullable
+
+class A {}
+
+A a; //# 01: compile-time error
+String s; //# 02: compile-time error
+int i; //# 03: compile-time error
+bool b; //# 04: compile-time error
+
+main() {
+}
diff --git a/LanguageFeatures/nnbd/static_errors_A04_t02.dart b/LanguageFeatures/nnbd/static_errors_A04_t02.dart
new file mode 100644
index 0000000..bb607c9
--- /dev/null
+++ b/LanguageFeatures/nnbd/static_errors_A04_t02.dart
@@ -0,0 +1,26 @@
+/*
+ * 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 top level variable, static variable, or
+ * instance field with potentially non-nullable type has no initializer
+ * 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
+ */
+// SharedOptions=--enable-experiment=non-nullable
+
+class A {}
+
+class C {
+ static A a; //# 01: compile-time error
+ static String s; //# 02: compile-time error
+}
+
+main() {
+}
diff --git a/LanguageFeatures/nnbd/static_errors_A04_t03.dart b/LanguageFeatures/nnbd/static_errors_A04_t03.dart
new file mode 100644
index 0000000..5946de3
--- /dev/null
+++ b/LanguageFeatures/nnbd/static_errors_A04_t03.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 top level variable, static variable, or
+ * instance field with potentially non-nullable type has no initializer
+ * 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
+ * @author sgrekhov@unipro.ru
+ */
+// SharedOptions=--enable-experiment=non-nullable
+
+class A {
+}
+
+class C<X extends A?> {
+ X x;
+}
+
+main() {
+ new C<A?>();
+}
diff --git a/LanguageFeatures/nnbd/static_errors_A04_t04.dart b/LanguageFeatures/nnbd/static_errors_A04_t04.dart
new file mode 100644
index 0000000..a4cb232
--- /dev/null
+++ b/LanguageFeatures/nnbd/static_errors_A04_t04.dart
@@ -0,0 +1,32 @@
+/*
+ * 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 top level variable, static variable, or
+ * instance field with potentially non-nullable type has no initializer
+ * 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
+ * @author sgrekhov@unipro.ru
+ */
+// SharedOptions=--enable-experiment=non-nullable
+
+class A {}
+
+late A a;
+late String s;
+late int i;
+late bool b;
+
+final late A aa;
+final late String ss;
+final late int ii;
+final late bool bb;
+
+main() {
+}
diff --git a/LanguageFeatures/nnbd/static_errors_A04_t05.dart b/LanguageFeatures/nnbd/static_errors_A04_t05.dart
new file mode 100644
index 0000000..532f4af
--- /dev/null
+++ b/LanguageFeatures/nnbd/static_errors_A04_t05.dart
@@ -0,0 +1,27 @@
+/*
+ * 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 top level variable, static variable, or
+ * instance field with potentially non-nullable type has no initializer
+ * 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
+ * @author sgrekhov@unipro.ru
+ */
+// SharedOptions=--enable-experiment=non-nullable
+
+class A {}
+
+class C {
+ static A a; //# 01: compile-time error
+ static String s; //# 02: compile-time error
+}
+
+main() {
+}
diff --git a/LanguageFeatures/nnbd/static_errors_A04_t06.dart b/LanguageFeatures/nnbd/static_errors_A04_t06.dart
new file mode 100644
index 0000000..05f8011
--- /dev/null
+++ b/LanguageFeatures/nnbd/static_errors_A04_t06.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 top level variable, static variable, or
+ * instance field with potentially non-nullable type has no initializer
+ * 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
+ * @author sgrekhov@unipro.ru
+ */
+// SharedOptions=--enable-experiment=non-nullable
+
+class A {
+}
+
+class C<X extends A?> {
+ late X x;
+}
+
+main() {
+ new C<A?>();
+}
diff --git a/LanguageFeatures/nnbd/static_errors_A07_t01.dart b/LanguageFeatures/nnbd/static_errors_A07_t01.dart
new file mode 100644
index 0000000..dc0e2cc
--- /dev/null
+++ b/LanguageFeatures/nnbd/static_errors_A07_t01.dart
@@ -0,0 +1,38 @@
+/*
+ * 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 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.
+ * @author sgrekhov@unipro.ru
+ */
+// SharedOptions=--enable-experiment=non-nullable
+
+class A {
+ static void test1(var x, [A a]) {} //# 01: compile-time error
+
+ static void test2(var x, {A a}) {} //# 02: compile-time error
+}
+
+class C<X extends A?> {
+ X x;
+ C(this.x);
+
+ void test1<X extends A?>(var x, [X x]) {} //# 03: compile-time error
+
+ void test2<X extends A?>(var x, {X x}) {} //# 04: compile-time error
+}
+
+void test1<X extends A?>(var x, [X x]) {} //# 05: compile-time error
+
+void test2<X extends A?>(var x, {X x}) {} //# 06: compile-time error
+
+main() {
+ A? a = new A();
+ C<A?> c = new C<A?>(a);
+}