I have something like this in the code
var barCode: BarCode? = null
now getBarCode() is defined in the interface - then I get the error that this might be an accidental override. unfortunately this does not work:
var barCode: BarCode? = null
override get
I could do something like this:
private var barCode: BarCode? = null
override fun getBarCode(): BarCode? = barCode
fun setBarCode(barCode: BarCode) {
this.barCode = barCode
}
but this looks like way to many likes and verbosity for kotlin - there must be a shorter way - especially as this pattern will repeat multiple times in this class