also does anybody know how to make this more compa...
# announcements
g
also does anybody know how to make this more compact in kotlin 1.1?
Copy code
private var Offset.offsetValue
        get() = when(this){
            is Offset.Row -> rowOffset
            is Offset.Column -> columnOffset
        }
        set(value) = when(this){
            is Offset.Row -> rowOffset = value
            is Offset.Column -> columnOffset = value
        }
I feel like between using a delegate property and the property-delegate-access syntax, this should be smaller