blob: 2fe0def1097a7c39dc51c1221a6614d1b129f7d9 [file] [log] [blame]
// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER
class A {
companion object {
fun foo(): Int = 0
}
}
fun A.foo(): Double = 0.0
fun Any.foo(): Float = 1f
class B {
fun foo(): String = ""
companion object {
fun foo(): Int = 0
}
}
fun B.foo(): Double = 0.0
fun call(a: Any) {}
fun testA(a: A) {
call(A::foo)
call(A.Companion::foo)
}
fun testB(b: B) {
call(B::foo)
call(B()::foo)
call(B.Companion::foo)
}