concrete_class_has_enum_superinterface
Concrete classes can't have 'Enum' as a superinterface.
Description
#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 {}
Unless stated otherwise, the documentation on this site reflects Dart 3.7.3. Page last updated on 2025-05-08. View source or report an issue.