0

このスニペットのコンパイル中にエラーが発生するのはなぜですか?

trait ID[R <: Record[R] with KeyedRecord[Long]] {

  this: R =>

  val idField = new LongField(this)
}

エラー:

inferred type arguments [ID[R] with R] do not conform to class LongField's
type parameter bounds [OwnerType <: net.liftweb.record.Record[OwnerType]]

どうすればこれを修正できますか?


ロングフィールドの定義:

class LongField[OwnerType <: Record[OwnerType]](rec: OwnerType)
  extends Field[Long, OwnerType] with MandatoryTypedField[Long] with LongTypedField {
4

1 に答える 1