The docs for sealed classes say that they can have...
# announcements
a
The docs for sealed classes say that they can have abstract members. Does this cover member variables? I ask because the following code gives an error:
Copy code
sealed class Foo {
	abstract val bar: String // Error: property must be initialized
}
I’m aiming to have all subclasses of Foo be forced to have an implementation of
bar
https://kotlinlang.org/docs/reference/sealed-classes.html