#1207. More Enhanced Enums tests added
diff --git a/LanguageFeatures/Enhanced-Enum/grammar_A01_t05.dart b/LanguageFeatures/Enhanced-Enum/grammar_A01_t05.dart
index 237ed85..7cf4d28 100644
--- a/LanguageFeatures/Enhanced-Enum/grammar_A01_t05.dart
+++ b/LanguageFeatures/Enhanced-Enum/grammar_A01_t05.dart
@@ -34,7 +34,7 @@
day<String>(),
week<bool>(),;
- const Time2<T>();
+ const Time2();
}
main() {
diff --git a/LanguageFeatures/Enhanced-Enum/grammar_A03_t03.dart b/LanguageFeatures/Enhanced-Enum/grammar_A03_t03.dart
index 19a6620..f03e1ed 100644
--- a/LanguageFeatures/Enhanced-Enum/grammar_A03_t03.dart
+++ b/LanguageFeatures/Enhanced-Enum/grammar_A03_t03.dart
@@ -40,7 +40,7 @@
e2<String>("2", "22", 22),
e3<bool>(false, "3", 33);
- const E<T>(T t, String s, int v): _t = t, _s = s, _v = v;
+ const E(T t, String s, int v): _t = t, _s = s, _v = v;
final _t;
final _s;
diff --git a/LanguageFeatures/Enhanced-Enum/grammar_A06_t01.dart b/LanguageFeatures/Enhanced-Enum/grammar_A06_t01.dart
new file mode 100644
index 0000000..d110b61
--- /dev/null
+++ b/LanguageFeatures/Enhanced-Enum/grammar_A06_t01.dart
@@ -0,0 +1,59 @@
+// 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 We propose the following to also be allowed:
+///
+/// enum Name<T> with Mixin1, Mixin2 implements Interface1, Interface2 {
+/// id1<int>(args1), id2<String>(args2), id3<bool>(args3);
+/// memberDeclaration*
+/// const Name(params) : initList;
+/// }
+/// where memberDeclaration* is any sequence of static and instance member
+/// declarations and/or an unnamed generative const constructor declaration.
+///
+/// @description Check that it's a compile time error to declare any abstract
+/// members in enum
+/// @author sgrekhov@unipro.ru
+
+// SharedOptions=--enable-experiment=enhanced-enums
+
+enum E1 {
+ e1,
+ e2,
+ e3;
+
+ void foo();
+// ^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+}
+
+enum E2 {
+ e1(),
+ e2(),
+ e3();
+
+ int get foo;
+// ^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+}
+
+enum E3 {
+ e1(1),
+ e2(2),
+ e3(3);
+
+ const E3(int i);
+ void set foo(int val);
+// ^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+}
+
+main() {
+ E1.e1;
+ E2.e2;
+ E3.e3;
+}
diff --git a/LanguageFeatures/Enhanced-Enum/grammar_A07_t01.dart b/LanguageFeatures/Enhanced-Enum/grammar_A07_t01.dart
new file mode 100644
index 0000000..03c6252
--- /dev/null
+++ b/LanguageFeatures/Enhanced-Enum/grammar_A07_t01.dart
@@ -0,0 +1,49 @@
+// 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 We propose the following to also be allowed:
+///
+/// enum Name<T> with Mixin1, Mixin2 implements Interface1, Interface2 {
+/// id1<int>(args1), id2<String>(args2), id3<bool>(args3);
+/// memberDeclaration*
+/// const Name(params) : initList;
+/// }
+/// where memberDeclaration* is any sequence of static and instance member
+/// declarations and/or an unnamed generative const constructor declaration.
+///
+/// @description Check that enum declaration may contain external members
+/// @author sgrekhov@unipro.ru
+
+// SharedOptions=--enable-experiment=enhanced-enums
+
+enum E1 {
+ e1,
+ e2,
+ e3;
+
+ external void foo();
+}
+
+enum E2 {
+ e1(),
+ e2(),
+ e3();
+
+ external int get foo;
+}
+
+enum E3 {
+ e1(1),
+ e2(2),
+ e3(3);
+
+ const E3(int i);
+ external void set foo(int val);
+}
+
+main() {
+ E1.e1;
+ E2.e2;
+ E3.e3;
+}