blob: 67a7b9cc31d911042a7eb7675ff5889c2d6a891f [file]
// RUN_PIPELINE_TILL: CODEGEN
// 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.<!EXTENSION_SHADOWED_BY_MEMBER!>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)
}
/* GENERATED_FIR_TAGS: callableReference, classDeclaration, companionObject, funWithExtensionReceiver,
functionDeclaration, integerLiteral, objectDeclaration, stringLiteral */