#461. NNBD syntax tests added
diff --git a/LanguageFeatures/nnbd/syntax_A01_t01.dart b/LanguageFeatures/nnbd/syntax_A01_t01.dart
new file mode 100644
index 0000000..bbd684f
--- /dev/null
+++ b/LanguageFeatures/nnbd/syntax_A01_t01.dart
@@ -0,0 +1,48 @@
+/*
+ * 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 The grammar of types is extended to allow any type to be suffixed
+ * with a ? (e.g. int?) indicating the nullable version of that type.
+ *
+ * @description Check that any type can be suffixed with a ? indicating the
+ * nullable version of that type.
+ * @author sgrekhov@unipro.ru
+ */
+// SharedOptions=--enable-experiment=non-nullable
+
+class A {}
+
+class C<X extends A?> {
+  X x;
+  C(this.x);
+}
+
+A? testA(A? a) => a;
+
+C<X extends A?> ? testC(C<X extends A?>? c) => c;
+
+int ? testInt(int? i) => i;
+
+String? testString(String? s) => s;
+
+Object? testObject(Object? o) => o;
+
+main() {
+  A? a = null;
+  a = testA(a);
+
+  C<A?>? c = null;
+  c = testC(c);
+
+  int? i = null;
+  i = testInt(i);
+
+  Object? o = null;
+  o = testObject(o);
+
+  String? s = null;
+  s = testString(s);
+}
diff --git a/LanguageFeatures/nnbd/syntax_A01_t02.dart b/LanguageFeatures/nnbd/syntax_A01_t02.dart
new file mode 100644
index 0000000..1c80f9c
--- /dev/null
+++ b/LanguageFeatures/nnbd/syntax_A01_t02.dart
@@ -0,0 +1,31 @@
+/*
+ * 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 The grammar of types is extended to allow any type to be suffixed
+ * with a ? (e.g. int?) indicating the nullable version of that type.
+ *
+ * @description Check that any type can be suffixed with a ? indicating the
+ * nullable version of that type. Test top-level types
+ * @author sgrekhov@unipro.ru
+ */
+// SharedOptions=--enable-experiment=non-nullable
+
+dynamic? foo(dynamic? d) => d;
+
+void? bar(void? v) => v;
+
+Null? test(Null? n) => n;
+
+main() {
+  dynamic? d = null;
+  d = foo(d);
+
+  void? v = null;
+  v = bar(v);
+
+  Null? n = null;
+  n = test(n);
+}
diff --git a/LanguageFeatures/nnbd/syntax_A01_t03.dart b/LanguageFeatures/nnbd/syntax_A01_t03.dart
new file mode 100644
index 0000000..9eef89d
--- /dev/null
+++ b/LanguageFeatures/nnbd/syntax_A01_t03.dart
@@ -0,0 +1,23 @@
+/*
+ * 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 The grammar of types is extended to allow any type to be suffixed
+ * with a ? (e.g. int?) indicating the nullable version of that type.
+ *
+ * @description Check that any type can be suffixed with a ? indicating the
+ * nullable version of that type. Test function types
+ * @author sgrekhov@unipro.ru
+ */
+// SharedOptions=--enable-experiment=non-nullable
+
+typedef void foo();
+
+foo? bar(foo? v) => v;
+
+main() {
+  foo? f = null;
+  f = bar(f);
+}
diff --git a/LanguageFeatures/nnbd/syntax_A01_t04.dart b/LanguageFeatures/nnbd/syntax_A01_t04.dart
new file mode 100644
index 0000000..644fbcb
--- /dev/null
+++ b/LanguageFeatures/nnbd/syntax_A01_t04.dart
@@ -0,0 +1,54 @@
+/*
+ * 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 A new primitive type Never. This type is denoted by the built-in
+ * type declaration Never declared in dart:core.
+ *
+ * @description Check that any type can be suffixed with a ? indicating the
+ * nullable version of that type. Test type aliases
+ * @author sgrekhov@unipro.ru
+ */
+// SharedOptions=--enable-experiment=non-nullable,nonfunction-type-aliases
+
+class A {}
+
+class C<X extends A?> {
+  X x;
+  C(this.x);
+}
+
+A? testA(A? a) => a;
+
+C<X extends A?>? testC(C<X extends A?>? c) => c;
+
+int? testInt(int? i) => i;
+
+String? testString(String? s) => s;
+
+Object? testObject(Object? o) => o;
+
+typedef AAlias = A?;
+typedef CAlias = C<A?>?;
+typedef IntAlias = int?;
+typedef StringAlias = String?;
+typedef ObjectAlias = Object?;
+
+main() {
+  AAlias a = null;
+  a = testA(a);
+
+  CAlias c = null;
+  c = testC(c);
+
+  IntAlias i = null;
+  i = testInt(i);
+
+  ObjectAlias o = null;
+  o = testObject(o);
+
+  StringAlias s = null;
+  s = testString(s);
+}
diff --git a/LanguageFeatures/nnbd/syntax_A01_t05.dart b/LanguageFeatures/nnbd/syntax_A01_t05.dart
new file mode 100644
index 0000000..e9c1411
--- /dev/null
+++ b/LanguageFeatures/nnbd/syntax_A01_t05.dart
@@ -0,0 +1,29 @@
+/*
+ * 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 The grammar of types is extended to allow any type to be suffixed
+ * with a ? (e.g. int?) indicating the nullable version of that type.
+ *
+ * @description Check that any type can be suffixed with a ? indicating the
+ * nullable version of that type. Test different valid cases
+ * @author sgrekhov@unipro.ru
+ */
+// SharedOptions=--enable-experiment=non-nullable
+import "../../Utils/expect.dart";
+
+int ? testInt(int ? i) => i == null ? i ?? 0 : i;
+
+int ?
+testInt2(int
+? i) => i == null ? i ??
+0 : i;
+
+main() {
+  var x = null;
+  int ? a = x ??= 3 > 0 ? x ?? 1: x ?? 2;
+  Expect.equals(1, a);
+  Expect.equals(testInt(a), a);
+}
diff --git a/LanguageFeatures/nnbd/syntax_A02_t01.dart b/LanguageFeatures/nnbd/syntax_A02_t01.dart
new file mode 100644
index 0000000..58b8354
--- /dev/null
+++ b/LanguageFeatures/nnbd/syntax_A02_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 A new primitive type Never. This type is denoted by the built-in
+ * type declaration Never declared in dart:core.
+ *
+ * @description Check new primitive type Never
+ * @author sgrekhov@unipro.ru
+ */
+// SharedOptions=--enable-experiment=non-nullable
+import "../../Utils/expect.dart";
+
+class C {}
+
+dynamic test() => Never;
+
+main() {
+  C c1 = Never;
+  c1 = test();
+  Expect.isTrue(c1 is Never);
+
+  C? c2 = Never;
+  c2 = test();
+  Expect.isTrue(c2 is Never);
+}
diff --git a/LanguageFeatures/nnbd/syntax_A02_t02.dart b/LanguageFeatures/nnbd/syntax_A02_t02.dart
new file mode 100644
index 0000000..f86bd7a
--- /dev/null
+++ b/LanguageFeatures/nnbd/syntax_A02_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 A new primitive type Never. This type is denoted by the built-in
+ * type declaration Never declared in dart:core.
+ *
+ * @description Check new primitive type Never. Test type alias
+ * @author sgrekhov@unipro.ru
+ */
+// SharedOptions=--enable-experiment=non-nullable,nonfunction-type-aliases
+import "../../Utils/expect.dart";
+
+class C {}
+
+typedef Neverland = Never;
+
+dynamic test() => Neverland;
+
+main() {
+  C c1 = Neverland;
+  c1 = test();
+  Expect.isTrue(c1 is Never);
+
+  C? c2 = Neverland;
+  c2 = test();
+  Expect.isTrue(c2 is Never);
+}
diff --git a/LanguageFeatures/nnbd/syntax_A03_t01.dart b/LanguageFeatures/nnbd/syntax_A03_t01.dart
new file mode 100644
index 0000000..c0cbd76
--- /dev/null
+++ b/LanguageFeatures/nnbd/syntax_A03_t01.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 The grammar of expressions is extended to allow any expression to
+ * be suffixed with a !.
+ *
+ * @description Check that any expression can be suffixed with a !
+ * @author sgrekhov@unipro.ru
+ */
+// SharedOptions=--enable-experiment=non-nullable
+
+class C {}
+
+test1(C c) {}
+
+test2(Object o) {}
+
+main() {
+  C? c = new C();
+  test1(c!);
+
+  Object? o = new Object();
+  test2(o!);
+
+  int? i = 42;
+  test2(i);
+
+  Never n = null!;
+}
diff --git a/LanguageFeatures/nnbd/syntax_A03_t02.dart b/LanguageFeatures/nnbd/syntax_A03_t02.dart
new file mode 100644
index 0000000..d1a79b5
--- /dev/null
+++ b/LanguageFeatures/nnbd/syntax_A03_t02.dart
@@ -0,0 +1,25 @@
+/*
+ * 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 The grammar of expressions is extended to allow any expression to
+ * be suffixed with a !.
+ *
+ * @description Check that any expression can be suffixed with a !. Test type
+ * aliases
+ * @author sgrekhov@unipro.ru
+ */
+// SharedOptions=--enable-experiment=non-nullable,nonfunction-type-aliases
+
+class C {}
+
+typedef CAlias = C?;
+
+test(C c) {}
+
+main() {
+  CAlias c = new C();
+  test(c!);
+}
diff --git a/LanguageFeatures/nnbd/syntax_A04_t01.dart b/LanguageFeatures/nnbd/syntax_A04_t01.dart
new file mode 100644
index 0000000..8ca25a6
--- /dev/null
+++ b/LanguageFeatures/nnbd/syntax_A04_t01.dart
@@ -0,0 +1,61 @@
+/*
+ * 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 The modifier late is added as a built-in identifier. The grammar
+ * of top level variables, static fields, instance fields, and local variables
+ * is extended to allow any declaration to include the modifier late.
+ *
+ * @description Check that declaration of any top level variables, static
+ * fields, instance fields, and local variables cab be extended by 'late'
+ * modifier
+ * @author sgrekhov@unipro.ru
+ */
+// SharedOptions=--enable-experiment=non-nullable
+import "../../Utils/expect.dart";
+
+class A {
+  static final instance = new C();
+}
+
+class C {
+  static late String staticVar1 = "staticVar1";
+  static late final staticVar2 = "staticVar2";
+  static late var staticVar3 = "staticVar3";
+
+  late String instanceVar1 = "instanceVar1";
+  late final instanceVar2 = "instanceVar2";
+  late var instanceVar3 = "instanceVar3";
+
+  covariant late C instanceVar4 = A.instance;
+  covariant late var instanceVar5 = A.instance;
+
+  late covariant C instanceVar6 = A.instance;
+  late covariant var instanceVar7 = A.instance;
+}
+
+late String globalVar1 = "globalVar1";
+late final globalVar2 = "globalVar2";
+late var globalVar3 = "globalVar3";
+
+main() {
+  late String localVar1 = "localVar1";
+  late final localVar12 = "localVar2";
+  late var localVar3 = "localVar3";
+
+  Expect.equals("staticVar1", C.staticVar1);
+  Expect.equals("staticVar2", C.staticVar2);
+  Expect.equals("staticVar3", C.staticVar3);
+  Expect.equals("instanceVar1", A.instance.instanceVar1);
+  Expect.equals("instanceVar2", A.instance.instanceVar2);
+  Expect.equals("instanceVar3", A.instance.instanceVar3);
+  Expect.equals(A.instance, A.instance.instanceVar4);
+  Expect.equals(A.instance, A.instance.instanceVar5);
+  Expect.equals(A.instance, A.instance.instanceVar6);
+  Expect.equals(A.instance, A.instance.instanceVar7);
+  Expect.equals("localVar1", localVar1);
+  Expect.equals("localVar2", localVar2);
+  Expect.equals("localVar3", localVar3);
+}