Fixes #392. Added tests for Static extension methods syntax
diff --git a/LanguageFeatures/Extension-methods/my_fancy_list_lib.dart b/LanguageFeatures/Extension-methods/my_fancy_list_lib.dart
new file mode 100644
index 0000000..40039c9
--- /dev/null
+++ b/LanguageFeatures/Extension-methods/my_fancy_list_lib.dart
@@ -0,0 +1,14 @@
+/*
+ * 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.
+ */
+// SharedOptions=--enable-experiment=extension-methods
+library my_fancy_list_lib;
+
+extension MyFancyList<T> on List<T> {
+  int get doubleLength => this.length * 2;
+  List<T> operator-() => this.reversed.toList();
+  List<List<T>> split(int at) => <List<T>>[this.sublist(0, at), this.sublist(at)];
+  static String get className => "List";
+}
diff --git a/LanguageFeatures/Extension-methods/syntax_name_t01.dart b/LanguageFeatures/Extension-methods/syntax_name_t01.dart
new file mode 100644
index 0000000..4b6ef03
--- /dev/null
+++ b/LanguageFeatures/Extension-methods/syntax_name_t01.dart
@@ -0,0 +1,33 @@
+/*
+ * 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 an extension declaration is a top-level declaration with a grammar
+ * similar to:
+ * <extension> ::=
+ *   `extension' <identifier>? <typeParameters>? `on' <type> `?'? `{'
+ *     memberDeclaration*
+ *   `}'
+ * Such a declaration introduces its name (the identifier) into the surrounding
+ * scope. The name does not denote a type, but it can be used to denote the
+ * extension itself in various places. The name can be hidden or shown in import
+ * or export declarations.
+ *
+ * @description Check that the name does not denote a type
+ * @compile-error
+ * @author sgrekhov@unipro.ru
+ */
+// SharedOptions=--enable-experiment=extension-methods
+
+extension MyFancyList<T> on List<T> {
+  int get doubleLength => this.length * 2;
+  List<T> operator-() => this.reversed.toList();
+  List<List<T>> split(int at) => <List<T>>[this.sublist(0, at), this.sublist(at)];
+  static String get className => "List";
+}
+
+main() {
+  MyFancyList<String> list = ["Lily", "was", "here"];
+}
diff --git a/LanguageFeatures/Extension-methods/syntax_name_t02.dart b/LanguageFeatures/Extension-methods/syntax_name_t02.dart
new file mode 100644
index 0000000..80b11dd
--- /dev/null
+++ b/LanguageFeatures/Extension-methods/syntax_name_t02.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 an extension declaration is a top-level declaration with a grammar
+ * similar to:
+ * <extension> ::=
+ *   `extension' <identifier>? <typeParameters>? `on' <type> `?'? `{'
+ *     memberDeclaration*
+ *   `}'
+ * Such a declaration introduces its name (the identifier) into the surrounding
+ * scope. The name does not denote a type, but it can be used to denote the
+ * extension itself in various places. The name can be hidden or shown in import
+ * or export declarations.
+ *
+ * @description Check that the name does not denote a type
+ * @compile-error
+ * @author sgrekhov@unipro.ru
+ */
+// SharedOptions=--enable-experiment=extension-methods
+
+import "my_fancy_list_lib.dart";
+
+main() {
+  MyFancyList<String> list = ["Lily", "was", "here"];
+}
diff --git a/LanguageFeatures/Extension-methods/syntax_name_t03.dart b/LanguageFeatures/Extension-methods/syntax_name_t03.dart
new file mode 100644
index 0000000..ad2efcf
--- /dev/null
+++ b/LanguageFeatures/Extension-methods/syntax_name_t03.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 an extension declaration is a top-level declaration with a grammar
+ * similar to:
+ * <extension> ::=
+ *   `extension' <identifier>? <typeParameters>? `on' <type> `?'? `{'
+ *     memberDeclaration*
+ *   `}'
+ * Such a declaration introduces its name (the identifier) into the surrounding
+ * scope. The name does not denote a type, but it can be used to denote the
+ * extension itself in various places. The name can be hidden or shown in import
+ * or export declarations.
+ *
+ * @description Check that the name  can be hidden or shown in import or export
+ * declarations.
+ * @compile-error
+ * @author sgrekhov@unipro.ru
+ */
+// SharedOptions=--enable-experiment=extension-methods
+
+import "my_fancy_list_lib.dart" hide MyFancyList;
+
+main() {
+    List<String> list = ["Lily", "was", "here"];
+    list.doubleLength;
+}
diff --git a/LanguageFeatures/Extension-methods/syntax_name_t04.dart b/LanguageFeatures/Extension-methods/syntax_name_t04.dart
new file mode 100644
index 0000000..c8ff4c3
--- /dev/null
+++ b/LanguageFeatures/Extension-methods/syntax_name_t04.dart
@@ -0,0 +1,33 @@
+/*
+ * 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 an extension declaration is a top-level declaration with a grammar
+ * similar to:
+ * <extension> ::=
+ *   `extension' <identifier>? <typeParameters>? `on' <type> `?'? `{'
+ *     memberDeclaration*
+ *   `}'
+ * Such a declaration introduces its name (the identifier) into the surrounding
+ * scope. The name does not denote a type, but it can be used to denote the
+ * extension itself in various places. The name can be hidden or shown in import
+ * or export declarations.
+ *
+ * @description Check that the name  can be hidden or shown in import or export
+ * declarations.
+ * @author sgrekhov@unipro.ru
+ */
+// SharedOptions=--enable-experiment=extension-methods
+
+import "../../Utils/expect.dart";
+import "my_fancy_list_lib.dart" show MyFancyList;
+
+main() {
+  List<String> list = ["Lily", "was", "here"];
+  Expect.equals(6, list.doubleLength);
+  Expect.listEquals([["Lily"], ["was", "here"]], list.split(1));
+  Expect.listEquals(["here", "was", "Lily"], -list.split);
+  Expect.listEquals(["List"], List.className);
+}
diff --git a/LanguageFeatures/Extension-methods/syntax_t01.dart b/LanguageFeatures/Extension-methods/syntax_t01.dart
new file mode 100644
index 0000000..acec964
--- /dev/null
+++ b/LanguageFeatures/Extension-methods/syntax_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 an extension declaration is a top-level declaration with a grammar
+ * similar to:
+ * <extension> ::=
+ *   `extension' <identifier>? <typeParameters>? `on' <type> `?'? `{'
+ *     memberDeclaration*
+ *   `}'
+ * Such a declaration introduces its name (the identifier) into the surrounding
+ * scope
+ *
+ * @description Check correct syntax of top-level extension declaration
+ * @author sgrekhov@unipro.ru
+ */
+// SharedOptions=--enable-experiment=extension-methods
+
+import "../../Utils/expect.dart";
+
+extension MyFancyList<T> on List<T> {
+  int get doubleLength => this.length * 2;
+  List<T> operator-() => this.reversed.toList();
+  List<List<T>> split(int at) => <List<T>>[this.sublist(0, at), this.sublist(at)];
+  static String get className => "List";
+}
+
+main() {
+  List<String> list = ["Lily", "was", "here"];
+  Expect.equals(6, list.doubleLength);
+  Expect.listEquals([["Lily"], ["was", "here"]], list.split(1));
+  Expect.listEquals(["here", "was", "Lily"], -list.split);
+  Expect.listEquals(["List"], List.className);
+}
diff --git a/LanguageFeatures/Extension-methods/syntax_t02.dart b/LanguageFeatures/Extension-methods/syntax_t02.dart
new file mode 100644
index 0000000..d857339
--- /dev/null
+++ b/LanguageFeatures/Extension-methods/syntax_t02.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 an extension declaration is a top-level declaration with a grammar
+ * similar to:
+ * <extension> ::=
+ *   `extension' <identifier>? <typeParameters>? `on' <type> `?'? `{'
+ *     memberDeclaration*
+ *   `}'
+ * Such a declaration introduces its name (the identifier) into the surrounding
+ * scope
+ *
+ * @description Check that it is compile-error if extension declaration is not
+ * top-level
+ * @author sgrekhov@unipro.ru
+ */
+// SharedOptions=--enable-experiment=extension-methods
+
+class C {
+  extension MyFancyList<T> on List<T> {       //# 01: compile-time error
+    int get doubleLength => this.length * 2;  //# 01: compile-time error
+  }                                           //# 01: compile-time error
+}
+
+main() {
+  extension MyFancyList<T> on List<T> {       //# 02: compile-time error
+    int get doubleLength => this.length * 2;  //# 02: compile-time error
+  }                                           //# 02: compile-time error
+}
diff --git a/LanguageFeatures/Extension-methods/syntax_t03.dart b/LanguageFeatures/Extension-methods/syntax_t03.dart
new file mode 100644
index 0000000..a2e757a
--- /dev/null
+++ b/LanguageFeatures/Extension-methods/syntax_t03.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 an extension declaration is a top-level declaration with a grammar
+ * similar to:
+ * <extension> ::=
+ *   `extension' <identifier>? <typeParameters>? `on' <type> `?'? `{'
+ *     memberDeclaration*
+ *   `}'
+ * Such a declaration introduces its name (the identifier) into the surrounding
+ * scope
+ *
+ * @description Check that identifier may be omitted
+ * @author sgrekhov@unipro.ru
+ */
+// SharedOptions=--enable-experiment=extension-methods
+
+import "../../Utils/expect.dart";
+
+extension on List<T> {
+  int get doubleLength => this.length * 2;
+  List<T> operator-() => this.reversed.toList();
+  List<List<T>> split(int at) => <List<T>>[this.sublist(0, at), this.sublist(at)];
+  static String get className => "List";
+}
+
+main() {
+  List<String> list = ["Lily", "was", "here"];
+  Expect.equals(6, list.doubleLength);
+  Expect.listEquals([["Lily"], ["was", "here"]], list.split(1));
+  Expect.listEquals(["here", "was", "Lily"], -list.split);
+  Expect.listEquals(["List"], List.className);
+}
diff --git a/LanguageFeatures/Extension-methods/syntax_t04.dart b/LanguageFeatures/Extension-methods/syntax_t04.dart
new file mode 100644
index 0000000..e00ca8f
--- /dev/null
+++ b/LanguageFeatures/Extension-methods/syntax_t04.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 an extension declaration is a top-level declaration with a grammar
+ * similar to:
+ * <extension> ::=
+ *   `extension' <identifier>? <typeParameters>? `on' <type> `?'? `{'
+ *     memberDeclaration*
+ *   `}'
+ * Such a declaration introduces its name (the identifier) into the surrounding
+ * scope
+ *
+ * @description Check an empty extension
+ * @author sgrekhov@unipro.ru
+ */
+// SharedOptions=--enable-experiment=extension-methods
+
+class C {}
+
+extension MyC on C {}
+
+main() {
+  new C();
+}
diff --git a/LanguageFeatures/Extension-methods/syntax_type_t01.dart b/LanguageFeatures/Extension-methods/syntax_type_t01.dart
new file mode 100644
index 0000000..19a64c2
--- /dev/null
+++ b/LanguageFeatures/Extension-methods/syntax_type_t01.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 an extension declaration is a top-level declaration with a grammar
+ * similar to:
+ * <extension> ::=
+ *   `extension' <identifier>? <typeParameters>? `on' <type> `?'? `{'
+ *     memberDeclaration*
+ *   `}'
+ * ...
+ * The type can be any valid Dart type, including a single type variable. It can
+ * refer to the type parameters of the extension. It can be followed by ? which
+ * means that it allows null values. When Dart gets non-nullable types by
+ * default (NNBD), this ? syntax is removed and subsumed by nullable types like
+ * int? being allowed in the <type> position.
+ *
+ * @description Check that The type can be any valid Dart type, including a
+ * single type variable
+ * @author sgrekhov@unipro.ru
+ */
+// SharedOptions=--enable-experiment=extension-methods
+class C<T> {}
+
+extension MyC<T> on C<T> {}
+
+extension MyT<T extends C> on T {}
+
+extension MyC2<X extends C, Y> on C<Y> {}
+
+main() {
+}
diff --git a/LanguageFeatures/Extension-methods/syntax_type_t02.dart b/LanguageFeatures/Extension-methods/syntax_type_t02.dart
new file mode 100644
index 0000000..a1b5673
--- /dev/null
+++ b/LanguageFeatures/Extension-methods/syntax_type_t02.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 an extension declaration is a top-level declaration with a grammar
+ * similar to:
+ * <extension> ::=
+ *   `extension' <identifier>? <typeParameters>? `on' <type> `?'? `{'
+ *     memberDeclaration*
+ *   `}'
+ * ...
+ * The type can be any valid Dart type, including a single type variable. It can
+ * refer to the type parameters of the extension. It can be followed by ? which
+ * means that it allows null values. When Dart gets non-nullable types by
+ * default (NNBD), this ? syntax is removed and subsumed by nullable types like
+ * int? being allowed in the <type> position.
+ *
+ * @description Check that The type can be any valid Dart type, including a
+ * single type variable. Test nullable types
+ * @author sgrekhov@unipro.ru
+ */
+// SharedOptions=--enable-experiment=extension-methods,non-nullable
+class C<T> {}
+
+extension MyC<T> on C<T>? {}
+
+extension MyT<T extends C> on T? {}
+
+extension MyT<X extends C, Y> on C<Y>? {}
+
+main() {
+}