open class A(x : Int) {
public virtual val y : Int = x
}
open class B(s : String)
val ab = object : A(1), B("abc") {
override val y = 15
}
The code sample here is wrong http://confluence.jetbrains.net/display/Kotlin/Object+expressions+and+Declarations
- virtual is not a keyword.
- object expression can only have one class as supertypes.