// !WITH_NEW_INFERENCE // !CHECK_TYPE // !DIAGNOSTICS: -UNUSED_PARAMETER, -UNUSED_VARIABLE class Wrapper fun Wrapper.foo(x: R): S = TODO() fun Wrapper.fooIntString(x: Int): String = "" fun Wrapper.fooReturnString(x: T): String = "" fun Wrapper.fooTakeInt(x: Int): T = TODO() fun bar(f: T.(R) -> S): Tripple = TODO() fun baz(x: T, y: R, z: S, f: T.(R) -> S): Tripple = TODO() class Tripple(val a: A, val b: B, val c: C) fun test1() { val x: Wrapper.(String) -> Boolean = Wrapper::foo bar(Wrapper::foo).checkType { _>() } bar(Wrapper::fooIntString).checkType { _>() } } fun test2() { bar(Wrapper::fooReturnString).checkType { _>() } bar(Wrapper::fooReturnString).checkType { _>() } bar(Wrapper::fooReturnString) bar(Wrapper::fooReturnString) bar(Wrapper::fooTakeInt).checkType { _>() } bar(Wrapper::fooTakeInt).checkType { _>() } }