Andreas Sinz
val x: ParentBar = ChildBar() x.foo = ChildFoo2() //Setting works fine println(x.foo) //ChildFoo2() as ChildFoo blows up at runtime