Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class C1 implements M1 {
class C2 implements M2 {
// ^^
// [analyzer] unspecified
// [cfe] unspecified;
// [cfe] unspecified
int get index => 2;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class C1 implements Enum {
class C2 extends Enum {
// ^^^^
// [analyzer] unspecified
// [cfe] unspecified;
// [cfe] unspecified
}

class C3 with Enum {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ abstract class E1 extends Enum {
}

abstract class E2 extends Enum {
int String hashCode => "42";
String get hashCode => "42";
// ^^^^^^^^
// [analyzer] unspecified
// [cfe] unspecified
Expand Down
9 changes: 3 additions & 6 deletions LanguageFeatures/Enhanced-Enum/implementing_enum_A04_t16.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,15 @@
/// "primitive equality", and we want to ensure that enums can be used in
/// switches.
///
/// @description Check that it's a compile-time error if a class declaration has
/// Enum as a superinterface, and it declares a non-abstract instance member
/// named `hashCode`.
/// @description Check that it's not a compile-time error if a class declaration
/// has Enum as a superinterface, and it declares a non-abstract instance member
/// named `hashCode=`, but the setter/getter signature constraint does apply.
/// @author [email protected]

// SharedOptions=--enable-experiment=enhanced-enums

abstract class E1 extends Enum {
void set hashCode(int val) {}
// ^^^^^^^^
// [analyzer] unspecified
// [cfe] unspecified
}

abstract class E2 extends Enum {
Expand Down
9 changes: 3 additions & 6 deletions LanguageFeatures/Enhanced-Enum/implementing_enum_A04_t20.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
/// "primitive equality", and we want to ensure that enums can be used in
/// switches.
///
/// @description Check that it's a compile-time error if an enum declaration has
/// Enum as a superinterface, and it declares a non-abstract instance member
/// named `hashCode`.
/// @description Check that it's not a compile-time error if an enum declaration
/// has Enum as a superinterface, and it declares a non-abstract instance member
/// named `hashCode=`, but the setter/getter signature constraint does apply.
/// @author [email protected]

// SharedOptions=--enable-experiment=enhanced-enums
Expand All @@ -30,9 +30,6 @@ enum E1 {
e2;

void set hashCode(int val) {}
// ^^^^^^^^
// [analyzer] unspecified
// [cfe] unspecified
}

enum E2 {
Expand Down
9 changes: 3 additions & 6 deletions LanguageFeatures/Enhanced-Enum/implementing_enum_A04_t24.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,15 @@
/// "primitive equality", and we want to ensure that enums can be used in
/// switches.
///
/// @description Check that it's a compile-time error if a mixin declaration has
/// Enum as a superinterface, and it declares a non-abstract instance member
/// named `hashCode`.
/// @description Check that it's not a compile-time error if a mixin declaration
/// has Enum as a superinterface, and it declares a non-abstract instance member
/// named `hashCode=`, but the setter/getter signature constraint does apply.
/// @author [email protected]

// SharedOptions=--enable-experiment=enhanced-enums

mixin M1 on Enum {
void set hashCode(int v) {}
// ^^^^^^^^
// [analyzer] unspecified
// [cfe] unspecified
}

mixin M2 on Enum {
Expand Down
4 changes: 2 additions & 2 deletions LanguageFeatures/Enhanced-Enum/implementing_enum_A04_t27.dart
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ mixin M1 on Enum {
}

mixin M2 on Enum {
bool operator ==(covariant E2 other) {
// ^^^^^^^^^^^
bool operator ==(covariant M2 other) {
// ^^^^^^^^^^^
// [analyzer] unspecified
// [cfe] unspecified
return false;
Expand Down