on_repeated
The type '{0}' can be included in the superclass constraints only once.
Description
#The analyzer produces this diagnostic when the same type is listed in the superclass constraints of a mixin multiple times.
Example
#The following code produces this diagnostic because A
is included twice in the superclass constraints for M
:
dart
mixin M on A, A {
}
class A {}
class B {}
Common fixes
#If a different type should be included in the superclass constraints, then replace one of the occurrences with the other type:
dart
mixin M on A, B {
}
class A {}
class B {}
If no other type was intended, then remove the repeated type name:
dart
mixin M on A {
}
class A {}
class B {}
Was this page's content helpful?
Thank you for your feedback!
Provide details Thank you for your feedback! Please let us know what we can do to improve.
Provide details Unless stated otherwise, the documentation on this site reflects Dart 3.8.1. Page last updated on 2025-05-08. View source or report an issue.