Allow super calls in object declarations
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
open class A {
|
||||
open fun foo(): Int {
|
||||
return 2
|
||||
}
|
||||
}
|
||||
|
||||
object O: A() {
|
||||
override fun foo(): Int {
|
||||
val s = super<A>.foo()
|
||||
return s + 3
|
||||
}
|
||||
}
|
||||
|
||||
fun box() : String {
|
||||
return if (O.foo() == 5) "OK" else "fail"
|
||||
}
|
||||
Reference in New Issue
Block a user