Files
codeql/java/ql/test/kotlin/library-tests/inherited-callee/Test.kt
Ian Lynagh 9dc933cfc8 Kotlin: Fix inherited-callee test
We can't define the same classes in Java and Kotlin.
2022-10-12 13:45:21 +01:00

34 lines
355 B
Kotlin

open class TestKt {
fun inheritMe() { }
}
interface ParentIfK {
fun inheritedInterfaceMethodK()
}
interface ChildIfK : ParentIfK {
}
class ChildKt : TestKt() {
fun user() {
val c = ChildKt()
c.toString()
c.equals(c)
c.hashCode()
c.inheritMe()
val c2: ParentIfK? = null
c2?.inheritedInterfaceMethodK()
}
}