E4167#
Default implementation is not marked with = _
.
错误示例#
///|
pub(open) trait HasDefaultImpl {
foo() -> Unit // It has default implementation but is not marked
}
///|
impl HasDefaultImpl with foo() {
println("OK")
}
建议#
Add = _
to the methods that have default implementations.
///|
pub(open) trait HasDefaultImpl {
foo() -> Unit = _
}