В следующем классе есть вспомогательный конструктор для неизменного изменения одного свойства.
class AccUnit(size: Long, start: Date, direction:Direction, protocol:String) {
def this(size:Long, that:AccUnit) {this(size, that.start, that.direction, that.protocol)}
}
Компилятор возвращает ошибки:
AccUnit.scala:26: error: value start is not a member of trafacct.AccUnit
def this(size:Long, that:AccUnit) {this(size, that.start, that.direction, that.protocol)}
^
AccUnit.scala:26: error: value direction is not a member of trafacct.AccUnit
def this(size:Long, that:AccUnit) {this(size, that.start, that.direction, that.protocol)}
^
AccUnit.scala:26: error: value protocol is not a member of trafacct.AccUnit
def this(size:Long, that:AccUnit) {this(size, that.start, that.direction, that.protocol)}
Почему он считает, что неттакие члены?