#389. More NNBD static errors tests. Type aliases tests added
diff --git a/LanguageFeatures/nnbd/static_errors_A02_t04.dart b/LanguageFeatures/nnbd/static_errors_A02_t04.dart
new file mode 100644
index 0000000..5b0e5d9
--- /dev/null
+++ b/LanguageFeatures/nnbd/static_errors_A02_t04.dart
@@ -0,0 +1,45 @@
+/*
+ * 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 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. Test type aliases
+ * @author sgrekhov@unipro.ru
+ */
+// SharedOptions=--enable-experiment=non-nullable,nonfunction-type-aliases
+
+class A {
+  final String s = "Lily was here";
+  void foo() {}
+}
+
+typedef AAlias = A?;
+
+class C<X extends AAlias> {
+  X x;
+  C(this.x);
+
+  test() {
+    x.s;
+//   ^
+// [analyzer] unspecified
+// [cfe] unspecified
+    x.foo;
+//   ^
+// [analyzer] unspecified
+// [cfe] unspecified
+  }
+}
+
+main() {
+  A? a = new A();
+  C<A?> c = new C<A?>(a);
+  c.test();
+}
diff --git a/LanguageFeatures/nnbd/static_errors_A04_t07.dart b/LanguageFeatures/nnbd/static_errors_A04_t07.dart
new file mode 100644
index 0000000..f47b056
--- /dev/null
+++ b/LanguageFeatures/nnbd/static_errors_A04_t07.dart
@@ -0,0 +1,34 @@
+/*
+ * 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. Test type
+ * aliases
+ * @author sgrekhov@unipro.ru
+ */
+// SharedOptions=--enable-experiment=non-nullable,nonfunction-type-aliases
+
+class A {
+}
+
+typedef AAlias = A?;
+
+class C<X extends AAlias> {
+  X x;
+//   ^
+// [analyzer] unspecified
+// [cfe] unspecified
+}
+
+main() {
+  new C<AAlias>();
+}
diff --git a/LanguageFeatures/nnbd/static_errors_A07_t02.dart b/LanguageFeatures/nnbd/static_errors_A07_t02.dart
new file mode 100644
index 0000000..7c88ddf
--- /dev/null
+++ b/LanguageFeatures/nnbd/static_errors_A07_t02.dart
@@ -0,0 +1,59 @@
+/*
+ * 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. Test type aliases
+ * @author sgrekhov@unipro.ru
+ */
+// SharedOptions=--enable-experiment=non-nullable,nonfunction-type-aliases
+
+class A {
+  static void test1(var x, [A a]) {}
+//                             ^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+  static void test2(var x, {A a}) {}
+//                             ^
+// [analyzer] unspecified
+// [cfe] unspecified
+}
+
+typedef AAlias = A?;
+
+class C<X extends AAlias> {
+  X x;
+  C(this.x);
+
+  void test1<X extends AAlias>(var x, [X x]) {}
+//                                    ^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+  void test2<X extends AAlias>(var x, {X x}) {}
+//                                    ^
+// [analyzer] unspecified
+// [cfe] unspecified
+}
+
+void test1<X extends AAlias>(var x, [X x]) {}
+//                                  ^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+void test2<X extends AAlias>(var x, {X x}) {}
+//                                  ^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+main() {
+  AAlias a = new A();
+  C<AAlias> c = new C<AAlias>(a);
+}
diff --git a/LanguageFeatures/nnbd/static_errors_A10_t03.dart b/LanguageFeatures/nnbd/static_errors_A10_t03.dart
new file mode 100644
index 0000000..526f011
--- /dev/null
+++ b/LanguageFeatures/nnbd/static_errors_A10_t03.dart
@@ -0,0 +1,41 @@
+/*
+ * 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 the default List constructor with a length
+ * argument and a type argument which is potentially non-nullable.
+ *
+ * @description Check that it is an error to call the default List constructor
+ * with a length argument and a type argument which is potentially non-nullable.
+ * Test type aliases
+ * @author sgrekhov@unipro.ru
+ */
+// SharedOptions=--enable-experiment=non-nullable,nonfunction-type-aliases
+class A {}
+
+typedef AAlias = A?;
+
+class C<X extends AAlias> {
+  X x;
+  C(this.x);
+
+  test() {
+    List l1 = new List<X>(1);
+//                        ^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+    List l2 = new List<X>(0);
+//                        ^
+// [analyzer] unspecified
+// [cfe] unspecified
+  }
+}
+
+main() {
+  AAlias a = new A();
+  C<AAlias> c = new C<AAlias>(a);
+  c.test();
+}
diff --git a/LanguageFeatures/nnbd/static_errors_A11_t02.dart b/LanguageFeatures/nnbd/static_errors_A11_t02.dart
new file mode 100644
index 0000000..ada16c1
--- /dev/null
+++ b/LanguageFeatures/nnbd/static_errors_A11_t02.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 For the purposes of errors and warnings, the null aware operators
+ * ?., ?.., and ?.[] are checked as if the receiver of the operator had
+ * non-nullable type. More specifically, if the type of the receiver of a null
+ * aware operator is T, then the operator is checked as if the receiver had type
+ * NonNull(T).
+ *
+ * @description Check that it is no error if receiver has nullable type. Test
+ * type alias
+ * @author sgrekhov@unipro.ru
+ */
+// SharedOptions=--enable-experiment=non-nullable,nonfunction-type-aliases
+class A {
+  void test() {}
+  int operator[](int index) => 0;
+}
+
+typedef AAlias = A?;
+
+main() {
+  AAlias a = null;
+  a?.test();
+  a ?.. test();
+  a?.[0];
+}
diff --git a/LanguageFeatures/nnbd/static_errors_A12_t02.dart b/LanguageFeatures/nnbd/static_errors_A12_t02.dart
new file mode 100644
index 0000000..a07d902
--- /dev/null
+++ b/LanguageFeatures/nnbd/static_errors_A12_t02.dart
@@ -0,0 +1,57 @@
+/*
+ * 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 for a class to extend, implement, or mixin a type
+ * of the form T? for any T.
+ *
+ * @description Check that it is an error for a class to extend, implement,
+ * or mixin a type of the form T? for any T. Test type aliases
+ * @author sgrekhov@unipro.ru
+ */
+// SharedOptions=--enable-experiment=non-nullable,nonfunction-type-aliases
+class A {}
+class B {}
+class C {}
+
+typedef AAlias = A?;
+typedef BAlias = B?;
+typedef CAlias = C?;
+
+class C1 extends AAlias {}
+//               ^
+// [analyzer] unspecified
+// [cfe] unspecified
+class C2 implements AAlias {}
+//                  ^
+// [analyzer] unspecified
+// [cfe] unspecified
+class C3 = A with BAlias;
+//                ^
+// [analyzer] unspecified
+// [cfe] unspecified
+class C4 = A with B implements CAlias;
+//                             ^
+// [analyzer] unspecified
+// [cfe] unspecified
+class C5 extends A with BAlias {}
+//                      ^
+// [analyzer] unspecified
+// [cfe] unspecified
+mixin M1 on AAlias {}
+//          ^
+// [analyzer] unspecified
+// [cfe] unspecified
+mixin M2 on A, BAlias {}
+//             ^
+// [analyzer] unspecified
+// [cfe] unspecified
+mixin M3 on A implements BAlias {}
+//                       ^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+main() {
+}
diff --git a/LanguageFeatures/nnbd/static_errors_A15_t01.dart b/LanguageFeatures/nnbd/static_errors_A15_t01.dart
index 37da053..6a79adb 100644
--- a/LanguageFeatures/nnbd/static_errors_A15_t01.dart
+++ b/LanguageFeatures/nnbd/static_errors_A15_t01.dart
@@ -9,7 +9,6 @@
  *
  * @description Check that it is an error if the static type of e in the
  * expression throw e is not assignable to Object
- * @compile-error
  * @author sgrekhov@unipro.ru
  */
 // SharedOptions=--enable-experiment=non-nullable
@@ -19,6 +18,9 @@
 void test(var x) {
   if (!(x is Object)) {
     throw x;
+//        ^
+// [analyzer] unspecified
+// [cfe] unspecified
   }
 }
 
diff --git a/LanguageFeatures/nnbd/static_errors_A19_t03.dart b/LanguageFeatures/nnbd/static_errors_A19_t03.dart
new file mode 100644
index 0000000..c0c3033
--- /dev/null
+++ b/LanguageFeatures/nnbd/static_errors_A19_t03.dart
@@ -0,0 +1,42 @@
+/*
+ * 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 the object being iterated over by a for-in loop
+ * has a static type which is not dynamic, and is not a subtype of
+ * Iterable<dynamic>
+ *
+ * @description Check that it is an error if the object being iterated over by a
+ * for-in loop has a static type which is not dynamic, and is not a subtype of
+ * Iterable<dynamic>. Test type aliases
+ * @author sgrekhov@unipro.ru
+ */
+// SharedOptions=--enable-experiment=non-nullable,nonfunction-type-aliases
+
+class C {
+}
+
+typedef CAlias = C?;
+
+main() {
+  CAlias c = CAlias();
+  List<CAlias> list = [C(), null, CAlias()];
+  for (var o in new Object()) {}
+//                  ^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+  for (CAlias cc in list) {}
+//                  ^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+  for (var o in [Object(), Object(), null]) {}
+//               ^^^^^^^^^^^^^^^^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+  for (var o in [Object(), C(), c]) {}
+//               ^^^^^^^^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+}
diff --git a/LanguageFeatures/nnbd/static_errors_A20_t03.dart b/LanguageFeatures/nnbd/static_errors_A20_t03.dart
new file mode 100644
index 0000000..c10fe7b
--- /dev/null
+++ b/LanguageFeatures/nnbd/static_errors_A20_t03.dart
@@ -0,0 +1,47 @@
+/*
+ * 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 type aliases
+ * @author sgrekhov@unipro.ru
+ */
+// SharedOptions=--enable-experiment=non-nullable,nonfunction-type-aliases
+class A {
+  test() {}
+}
+
+class C extends A {}
+
+typedef CAlias = C?;
+
+main() {
+  A a = A();
+  CAlias c = C();
+  c?.test();
+// ^^
+// [analyzer] unspecified
+// [cfe] unspecified
+  c?..test();
+// ^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+  c ?? a;
+//  ^^
+// [analyzer] unspecified
+// [cfe] unspecified
+  a ??= c;
+//  ^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+  List<C> clist = [C(), C()];
+  List<A> alist = [A(), C(), ...? clist];
+//                           ^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+}