更新时间:2023-01-17 22:29:41
or
方法不使用类型参数:
The or
method does not take a type parameter:
implicit def toLazyOr[T](cons: Constraint[T]) = new {
def or(other: Constraint[T]) = Constraint { field: T =>
cons(field) match {
case Valid => other(field)
case Invalid => Invalid
}
}
}