https://kotlinlang.org logo
c

carlw

12/05/2018, 4:43 PM
I don't know the reasons for the closed class, but if you're looking for a workaround, I sometimes use the Properties or UserData objects to customize a class in order to avoid inheritance. For example, attaching a "currentPosition" property to a stock HBox instead of subclassing and declaring a field.