Immutable classes cannot have public variables for obvious reasons.
Possible solutions:
immutable class Thing<K> implements List<K> {
// would be generated automatically
public K first => super.first {
set {
let newData = ...
return new Thing(newData)
}
}
}
Immutable classes cannot have public variables for obvious reasons.
Possible solutions: