// FIR_IDENTICAL // !CHECK_TYPE // !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER -UNUSED_VARIABLE class A class B { fun foo() = this } fun test(foo: A.() -> Int) { with(A()) { foo() checkType { _() } with(B()) { foo() checkType { _() } this.foo() checkType { _() } } } }