Skip to content

Commit 74ba459

Browse files
authored
Fixes needed based on roll f512453 (#1323)
1 parent e123959 commit 74ba459

7 files changed

+14
-23
lines changed

LanguageFeatures/Enhanced-Enum/implementing_enum_A01_t06.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class C1 implements M1 {
3838
class C2 implements M2 {
3939
// ^^
4040
// [analyzer] unspecified
41-
// [cfe] unspecified;
41+
// [cfe] unspecified
4242
int get index => 2;
4343
}
4444

LanguageFeatures/Enhanced-Enum/implementing_enum_A01_t07.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class C1 implements Enum {
3232
class C2 extends Enum {
3333
// ^^^^
3434
// [analyzer] unspecified
35-
// [cfe] unspecified;
35+
// [cfe] unspecified
3636
}
3737

3838
class C3 with Enum {

LanguageFeatures/Enhanced-Enum/implementing_enum_A04_t15.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ abstract class E1 extends Enum {
3333
}
3434

3535
abstract class E2 extends Enum {
36-
int String hashCode => "42";
36+
String get hashCode => "42";
3737
// ^^^^^^^^
3838
// [analyzer] unspecified
3939
// [cfe] unspecified

LanguageFeatures/Enhanced-Enum/implementing_enum_A04_t16.dart

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,15 @@
1818
/// "primitive equality", and we want to ensure that enums can be used in
1919
/// switches.
2020
///
21-
/// @description Check that it's a compile-time error if a class declaration has
22-
/// Enum as a superinterface, and it declares a non-abstract instance member
23-
/// named `hashCode`.
21+
/// @description Check that it's not a compile-time error if a class declaration
22+
/// has Enum as a superinterface, and it declares a non-abstract instance member
23+
/// named `hashCode=`, but the setter/getter signature constraint does apply.
2424
/// @author [email protected]
2525
2626
// SharedOptions=--enable-experiment=enhanced-enums
2727

2828
abstract class E1 extends Enum {
2929
void set hashCode(int val) {}
30-
// ^^^^^^^^
31-
// [analyzer] unspecified
32-
// [cfe] unspecified
3330
}
3431

3532
abstract class E2 extends Enum {

LanguageFeatures/Enhanced-Enum/implementing_enum_A04_t20.dart

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818
/// "primitive equality", and we want to ensure that enums can be used in
1919
/// switches.
2020
///
21-
/// @description Check that it's a compile-time error if an enum declaration has
22-
/// Enum as a superinterface, and it declares a non-abstract instance member
23-
/// named `hashCode`.
21+
/// @description Check that it's not a compile-time error if an enum declaration
22+
/// has Enum as a superinterface, and it declares a non-abstract instance member
23+
/// named `hashCode=`, but the setter/getter signature constraint does apply.
2424
/// @author [email protected]
2525
2626
// SharedOptions=--enable-experiment=enhanced-enums
@@ -30,9 +30,6 @@ enum E1 {
3030
e2;
3131

3232
void set hashCode(int val) {}
33-
// ^^^^^^^^
34-
// [analyzer] unspecified
35-
// [cfe] unspecified
3633
}
3734

3835
enum E2 {

LanguageFeatures/Enhanced-Enum/implementing_enum_A04_t24.dart

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,15 @@
1818
/// "primitive equality", and we want to ensure that enums can be used in
1919
/// switches.
2020
///
21-
/// @description Check that it's a compile-time error if a mixin declaration has
22-
/// Enum as a superinterface, and it declares a non-abstract instance member
23-
/// named `hashCode`.
21+
/// @description Check that it's not a compile-time error if a mixin declaration
22+
/// has Enum as a superinterface, and it declares a non-abstract instance member
23+
/// named `hashCode=`, but the setter/getter signature constraint does apply.
2424
/// @author [email protected]
2525
2626
// SharedOptions=--enable-experiment=enhanced-enums
2727

2828
mixin M1 on Enum {
2929
void set hashCode(int v) {}
30-
// ^^^^^^^^
31-
// [analyzer] unspecified
32-
// [cfe] unspecified
3330
}
3431

3532
mixin M2 on Enum {

LanguageFeatures/Enhanced-Enum/implementing_enum_A04_t27.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ mixin M1 on Enum {
3535
}
3636

3737
mixin M2 on Enum {
38-
bool operator ==(covariant E2 other) {
39-
// ^^^^^^^^^^^
38+
bool operator ==(covariant M2 other) {
39+
// ^^^^^^^^^^^
4040
// [analyzer] unspecified
4141
// [cfe] unspecified
4242
return false;

0 commit comments

Comments
 (0)