// FIR_IDENTICAL
// IGNORE_FIR_DIAGNOSTICS
// DIAGNOSTICS: -NOTHING_TO_INLINE -NON_PUBLIC_CALL_FROM_PUBLIC_INLINE -NON_PUBLIC_INLINE_CALL_FROM_PUBLIC_INLINE
private fun foo() {}
private inline fun privateFun1() = ::foo
private inline fun privateFun2() = privateFun1()

class A {
    internal inline fun internalFun1() = <!IR_PRIVATE_CALLABLE_REFERENCED_BY_NON_PRIVATE_INLINE_FUNCTION_WARNING!>::<!CALLABLE_REFERENCE_TO_LESS_VISIBLE_DECLARATION_IN_INLINE_WARNING!>foo<!><!>
    internal inline fun internalFun2() = <!IR_PRIVATE_CALLABLE_REFERENCED_BY_NON_PRIVATE_INLINE_FUNCTION_CASCADING_WARNING!>privateFun2()<!>

    protected inline fun protectedFun1() = <!IR_PRIVATE_CALLABLE_REFERENCED_BY_NON_PRIVATE_INLINE_FUNCTION_WARNING!>::foo<!>
    protected inline fun protectedFun2() = <!IR_PRIVATE_CALLABLE_REFERENCED_BY_NON_PRIVATE_INLINE_FUNCTION_CASCADING_WARNING!>privateFun2()<!>

    public inline fun publicFun1() = <!IR_PRIVATE_CALLABLE_REFERENCED_BY_NON_PRIVATE_INLINE_FUNCTION_WARNING!>::foo<!>
    public inline fun publicFun2() = <!IR_PRIVATE_CALLABLE_REFERENCED_BY_NON_PRIVATE_INLINE_FUNCTION_CASCADING_WARNING!>privateFun2()<!>

    inline fun defaultFun1() = <!IR_PRIVATE_CALLABLE_REFERENCED_BY_NON_PRIVATE_INLINE_FUNCTION_WARNING!>::foo<!>
    inline fun defaultFun2() = <!IR_PRIVATE_CALLABLE_REFERENCED_BY_NON_PRIVATE_INLINE_FUNCTION_CASCADING_WARNING!>privateFun2()<!>
}
