Documentation bug for object expression


#1

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

  1. virtual is not a keyword.
  2. object expression can only have one class as supertypes.

#2

Fixed, thanks


#3

 

open class A(x : Int) {
  public val y : Int = x   
}
trait B {.}
val ab = object : A(1), B {
  override val y = 15
}


I guess it should be:

open class A(x : Int) {
  public open val y : Int = x   
}
trait B {.}
val ab = object : A(1), B {
  override val y = 15
}

#4

Fixed. Thanks