import java.util.stream.* interface A : MutableCollection { override fun removeIf(x: java.util.function.Predicate) = false } fun foo(x: MutableList, y: A) { x.removeIf { it.length > 0 } y.removeIf { it.length > 0 } }