// ISSUE: KT-65576 fun foo(): Int = 0 object Implicit { operator fun Any.invoke(): String = "Fail" val foo = foo() } object Explicit { operator fun Any.invoke(): String = "Fail" val foo: String = foo() } class Inv(val value: T) object ImplicitWrapped { operator fun Inv<*>.invoke(): Inv = Inv("Fail") val foo = Inv(foo)() } object ImplicitIndirect { operator fun Any.invoke(): String = "Fail" val foo get() = bar() val bar get() = baz() val baz get() = foo() } fun takeInt(x: Int) {} fun test() { takeInt(Implicit.foo) takeInt(Explicit.foo) // should be an error takeInt(ImplicitWrapped.foo) // should be an error takeInt(ImplicitIndirect.foo) // should be an error takeInt(ImplicitIndirect.bar) // should be an error takeInt(ImplicitIndirect.baz) }