Fixes #1286. Expect an error if mixin application on enum introduces anyv instance variables
diff --git a/LanguageFeatures/Enhanced-Enum/semantics_A03_t05.dart b/LanguageFeatures/Enhanced-Enum/semantics_A03_t05.dart
index 9d7dacc..ca2dab8 100644
--- a/LanguageFeatures/Enhanced-Enum/semantics_A03_t05.dart
+++ b/LanguageFeatures/Enhanced-Enum/semantics_A03_t05.dart
@@ -21,14 +21,13 @@
/// applications having const forwarding constructors, those should also apply
/// here.
///
-/// @description Check that it’s no compile-time error if such a mixin
+/// @description Check that it’s a compile-time error if such a mixin
/// application introduces final variables.
/// @author sgrekhov@unipro.ru
+/// @issue 48303
// SharedOptions=--enable-experiment=enhanced-enums
-import "../../Utils/expect.dart";
-
mixin M1 on Object {
final int i1 = 1;
int mixedInMethod1(int v) => v;
@@ -39,17 +38,25 @@
int mixedInMethod2(int i) => index + i;
}
-enum E with M1, M2 {
+enum E1 with M1 {
+// ^^
+// [analyzer] unspecified
+// [cfe] unspecified
+ e1,
+ e2,
+ e3;
+}
+
+enum E2 with M2 {
+// ^^
+// [analyzer] unspecified
+// [cfe] unspecified
e1,
e2,
e3;
}
main() {
- Expect.equals(1, E.e1.i1);
- Expect.equals(2, E.e1.i2);
- Expect.equals(1, E.e2.i1);
- Expect.equals(2, E.e2.i2);
- Expect.equals(1, E.e3.i1);
- Expect.equals(2, E.e3.i2);
+ E1.e1;
+ E2.e2;
}