Dart Analyze logoDart Analyze/
DRT-W1257

Concrete classes can't have 'Enum' as a superinterfaceDRT-W1257

Major severityMajor
Bug Risk categoryBug Risk

The analyzer produces this diagnostic when a concrete class indirectly has the class Enum as a superinterface.

Example

The following code produces this diagnostic because the concrete class B has Enum as a superinterface as a result of implementing A:

abstract class A implements Enum {}

class B implements A {}

Common fixes

If the implemented class isn't the class you intend to implement, then change it:

abstract class A implements Enum {}

class B implements C {}

class C {}

If the implemented class can be changed to not implement Enum, then do so:

abstract class A {}

class B implements A {}

If the implemented class can't be changed to not implement Enum, then remove it from the implements clause:

abstract class A implements Enum {}

class B {}