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 {}
除非另有说明,文档之所提及适用于 Dart 3.7.3 版本,本页面最后更新时间: 2025-05-08。 查看文档源码 或者 报告页面问题。