avoid coercing 'this' to a supertype; cleaner handling of stackvalues for 'this' and 'super' (KT-2395)

This commit is contained in:
Dmitry Jemerov
2012-07-11 16:59:01 +02:00
parent 739a1f8245
commit de3f5d0e2d
7 changed files with 45 additions and 33 deletions
@@ -0,0 +1,11 @@
import java.util.AbstractList
class MyList(): AbstractList<String>() {
public fun getModificationCount(): Int = modCount
public override fun get(index: Int): String? = ""
public override fun size(): Int = 0
}
fun box(): String {
return if (MyList().getModificationCount() == 0) "OK" else "fail"
}