I’m thinking, it’s quite easy to accidentally create a situation when I have custom setter that doesn’t set default backing field - but if I leave default getter it will be generated using the backing field (so it will always return initial value - which will not even use setter)
For example
private var _price : Float = 20
var price : Float = 10.0
set(value) {
_price = value
}
Using “price” property will always return 10.0. This is understandable, but shouldn’t we get at least some warning about it? I would say if setter doesn’t access backing field, default getter either shouldn’t be allowed at all (as it doesn’t really make sense in such case) or at least trigger warning