#1228. Named arguments anywhere tests added
diff --git a/LanguageFeatures/NamedArgumentsAnywhere/global_t01.dart b/LanguageFeatures/NamedArgumentsAnywhere/global_t01.dart
new file mode 100644
index 0000000..f03ed6f
--- /dev/null
+++ b/LanguageFeatures/NamedArgumentsAnywhere/global_t01.dart
@@ -0,0 +1,23 @@
+// Copyright (c) 2021, 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 Since named arguments are distinguishable from positional ones,
+/// allowing named arguments to be placed anywhere in the argument list can be
+/// done without changing calling semantics.
+///
+/// @description Checks that named arguments may be placed anywhere in the
+/// argument list. Test global functions
+/// @author sgrekhov@unipro.ru
+
+// SharedOptions=--enable-experiment=named-arguments-anywhere
+
+import "../../Utils/expect.dart";
+
+String foo(int x, int y, {int z = 42}) => "x=$x, y=$y, z=$z";
+
+main() {
+  Expect.equals("x=1, y=2, z=3", foo(1, 2, z: 3));
+  Expect.equals("x=1, y=2, z=3", foo(z: 3, 1, 2));
+  Expect.equals("x=1, y=2, z=3", foo(1, z: 3, 2));
+}
diff --git a/LanguageFeatures/NamedArgumentsAnywhere/global_t02.dart b/LanguageFeatures/NamedArgumentsAnywhere/global_t02.dart
new file mode 100644
index 0000000..8f2be61
--- /dev/null
+++ b/LanguageFeatures/NamedArgumentsAnywhere/global_t02.dart
@@ -0,0 +1,26 @@
+// Copyright (c) 2021, 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 Since named arguments are distinguishable from positional ones,
+/// allowing named arguments to be placed anywhere in the argument list can be
+/// done without changing calling semantics.
+///
+/// @description Checks that named arguments may be placed anywhere in the
+/// argument list. Test global functions
+/// @author sgrekhov@unipro.ru
+
+// SharedOptions=--enable-experiment=named-arguments-anywhere
+
+import "../../Utils/expect.dart";
+
+String foo<T>(T x, T y, {T? z}) => "x=$x, y=$y, z=$z";
+
+main() {
+  Expect.equals("x=1, y=2, z=3", foo(1, 2, z: 3));
+  Expect.equals("x=1, y=2, z=3", foo(z: 3, 1, 2));
+  Expect.equals("x=1, y=2, z=3", foo(1, z: 3, 2));
+  Expect.equals("x=1, y=2, z=3", foo<int>(1, 2, z: 3));
+  Expect.equals("x=1, y=2, z=3", foo<int>(z: 3, 1, 2));
+  Expect.equals("x=1, y=2, z=3", foo<int>(1, z: 3, 2));
+}
diff --git a/LanguageFeatures/NamedArgumentsAnywhere/local_t01.dart b/LanguageFeatures/NamedArgumentsAnywhere/local_t01.dart
new file mode 100644
index 0000000..82c7263
--- /dev/null
+++ b/LanguageFeatures/NamedArgumentsAnywhere/local_t01.dart
@@ -0,0 +1,23 @@
+// Copyright (c) 2021, 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 Since named arguments are distinguishable from positional ones,
+/// allowing named arguments to be placed anywhere in the argument list can be
+/// done without changing calling semantics.
+///
+/// @description Checks that named arguments may be placed anywhere in the
+/// argument list. Test local functions
+/// @author sgrekhov@unipro.ru
+
+// SharedOptions=--enable-experiment=named-arguments-anywhere
+
+import "../../Utils/expect.dart";
+
+main() {
+  String foo(int x, int y, {int z = 42}) => "x=$x, y=$y, z=$z";
+
+  Expect.equals("x=1, y=2, z=3", foo(1, 2, z: 3));
+  Expect.equals("x=1, y=2, z=3", foo(z: 3, 1, 2));
+  Expect.equals("x=1, y=2, z=3", foo(1, z: 3, 2));
+}
diff --git a/LanguageFeatures/NamedArgumentsAnywhere/local_t02.dart b/LanguageFeatures/NamedArgumentsAnywhere/local_t02.dart
new file mode 100644
index 0000000..33fb87d
--- /dev/null
+++ b/LanguageFeatures/NamedArgumentsAnywhere/local_t02.dart
@@ -0,0 +1,26 @@
+// Copyright (c) 2021, 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 Since named arguments are distinguishable from positional ones,
+/// allowing named arguments to be placed anywhere in the argument list can be
+/// done without changing calling semantics.
+///
+/// @description Checks that named arguments may be placed anywhere in the
+/// argument list. Test local functions
+/// @author sgrekhov@unipro.ru
+
+// SharedOptions=--enable-experiment=named-arguments-anywhere
+
+import "../../Utils/expect.dart";
+
+main() {
+  String foo<T>(T x, T y, {T? z}) => "x=$x, y=$y, z=$z";
+
+  Expect.equals("x=1, y=2, z=3", foo(1, 2, z: 3));
+  Expect.equals("x=1, y=2, z=3", foo(z: 3, 1, 2));
+  Expect.equals("x=1, y=2, z=3", foo(1, z: 3, 2));
+  Expect.equals("x=1, y=2, z=3", foo<int>(1, 2, z: 3));
+  Expect.equals("x=1, y=2, z=3", foo<int>(z: 3, 1, 2));
+  Expect.equals("x=1, y=2, z=3", foo<int>(1, z: 3, 2));
+}
diff --git a/LanguageFeatures/NamedArgumentsAnywhere/local_t03.dart b/LanguageFeatures/NamedArgumentsAnywhere/local_t03.dart
new file mode 100644
index 0000000..f2a8784
--- /dev/null
+++ b/LanguageFeatures/NamedArgumentsAnywhere/local_t03.dart
@@ -0,0 +1,27 @@
+// Copyright (c) 2021, 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 Since named arguments are distinguishable from positional ones,
+/// allowing named arguments to be placed anywhere in the argument list can be
+/// done without changing calling semantics.
+///
+/// @description Checks that named arguments may be placed anywhere in the
+/// argument list. Test local functions
+/// @author sgrekhov@unipro.ru
+
+// SharedOptions=--enable-experiment=named-arguments-anywhere
+
+import "../../Utils/expect.dart";
+
+main() {
+  Expect.equals("x=1, y=2, z=3", (int x, int y, {int z = 42}) {
+    "x=$x, y=$y, z=$z";}(1, 2, z: 3)
+  );
+  Expect.equals("x=1, y=2, z=3", (int x, int y, {int z = 42}) {
+    "x=$x, y=$y, z=$z";}(z: 3, 1, 2)
+  );
+  Expect.equals("x=1, y=2, z=3", (int x, int y, {int z = 42}) {
+    "x=$x, y=$y, z=$z";}(1, z: 3, 2)
+  );
+}
diff --git a/LanguageFeatures/NamedArgumentsAnywhere/local_t04.dart b/LanguageFeatures/NamedArgumentsAnywhere/local_t04.dart
new file mode 100644
index 0000000..08b2e47
--- /dev/null
+++ b/LanguageFeatures/NamedArgumentsAnywhere/local_t04.dart
@@ -0,0 +1,27 @@
+// Copyright (c) 2021, 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 Since named arguments are distinguishable from positional ones,
+/// allowing named arguments to be placed anywhere in the argument list can be
+/// done without changing calling semantics.
+///
+/// @description Checks that named arguments may be placed anywhere in the
+/// argument list. Test local functions
+/// @author sgrekhov@unipro.ru
+
+// SharedOptions=--enable-experiment=named-arguments-anywhere
+
+import "../../Utils/expect.dart";
+
+main() {
+  Expect.equals("x=1, y=2, z=3", <T>(T x, T y, {T? z}) {
+    "x=$x, y=$y, z=$z";}<int>(1, 2, z: 3)
+  );
+  Expect.equals("x=1, y=2, z=3", <T>(T x, T y, {T? z}) {
+    "x=$x, y=$y, z=$z";}<int>(z: 3, 1, 2)
+  );
+  Expect.equals("x=1, y=2, z=3", <T>(T x, T y, {T? z}) {
+    "x=$x, y=$y, z=$z";}<int>(1, z: 3, 2)
+  );
+}
diff --git a/LanguageFeatures/NamedArgumentsAnywhere/method_t01.dart b/LanguageFeatures/NamedArgumentsAnywhere/method_t01.dart
new file mode 100644
index 0000000..2ed5fdf
--- /dev/null
+++ b/LanguageFeatures/NamedArgumentsAnywhere/method_t01.dart
@@ -0,0 +1,25 @@
+// Copyright (c) 2021, 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 Since named arguments are distinguishable from positional ones,
+/// allowing named arguments to be placed anywhere in the argument list can be
+/// done without changing calling semantics.
+///
+/// @description Checks that named arguments may be placed anywhere in the
+/// argument list. Test instance method
+/// @author sgrekhov@unipro.ru
+
+// SharedOptions=--enable-experiment=named-arguments-anywhere
+
+import "../../Utils/expect.dart";
+
+class C {
+  String foo(int x, int y, {int z = 42}) => "x=$x, y=$y, z=$z";
+}
+
+main() {
+  Expect.equals("x=1, y=2, z=3", C().foo(1, 2, z: 3));
+  Expect.equals("x=1, y=2, z=3", C().foo(z: 3, 1, 2));
+  Expect.equals("x=1, y=2, z=3", C().foo(1, z: 3, 2));
+}
diff --git a/LanguageFeatures/NamedArgumentsAnywhere/method_t02.dart b/LanguageFeatures/NamedArgumentsAnywhere/method_t02.dart
new file mode 100644
index 0000000..db6e50a
--- /dev/null
+++ b/LanguageFeatures/NamedArgumentsAnywhere/method_t02.dart
@@ -0,0 +1,25 @@
+// Copyright (c) 2021, 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 Since named arguments are distinguishable from positional ones,
+/// allowing named arguments to be placed anywhere in the argument list can be
+/// done without changing calling semantics.
+///
+/// @description Checks that named arguments may be placed anywhere in the
+/// argument list. Test instance method
+/// @author sgrekhov@unipro.ru
+
+// SharedOptions=--enable-experiment=named-arguments-anywhere
+
+import "../../Utils/expect.dart";
+
+class C<T> {
+  String foo(T x, T y, {T z}) => "x=$x, y=$y, z=$z";
+}
+
+main() {
+  Expect.equals("x=1, y=2, z=3", C<int>().foo(1, 2, z: 3));
+  Expect.equals("x=1, y=2, z=3", C<int>().foo(z: 3, 1, 2));
+  Expect.equals("x=1, y=2, z=3", C<int>().foo(1, z: 3, 2));
+}