The following class has an auxillary constructor to change one property in an immutable way.
class AccUnit(size: Long, start: Date, direction:Direction, protocol:String) {
def this(size:Long, that:AccUnit) {this(size, that.start, that.direction, that.protocol)}
}
Compiler returns an errors:
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)}
Why does it think, there is no such members?