Files
codeql/java/ql/integration-tests/posix-only/kotlin/kotlin-interface-inherited-default/test.kt
Chris Smowton 14b8892ced Don't create interface forwarders for other interfaces, and target super accesses correctly
Intermediate interfaces don't need interface forwarders, since the Kotlin compiler won't try to make them non-abstract by synthesising methods.

Super references should always target an immediate superclass, not the ancestor containing the intended implementation.
2022-10-19 15:37:06 +01:00

17 lines
188 B
Kotlin

interface Test {
fun f() = 1
fun g(x: Int) = x
val x : Int
get() = 3
}
class Real : Test { }
interface MiddleInterface : Test { }
class RealIndirect : MiddleInterface { }