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