// !DIAGNOSTICS: -UNUSED_PARAMETER class Inv class C { fun bindTo(property: Inv) {} } fun foo(x: Any?, y: C<*>) { y.bindTo("") if (x is C<*>) { x.bindTo("") with(x) { bindTo("") } } with(x) { if (this is C<*>) { bindTo("") } } }