open class BaseClass {
val x = 10
}
class DerivedClass: BaseClass() {
fun foo() {
println("x is equal to " + x)
}
}
fun main(args: Array<String>) {
val derivedClass = DerivedClass()
derivedClass.foo() // prints: 'x is equal to 10'
}