interface Foo {} fun test(obj: Any, another: Foo) { if (obj is Foo) { consume(another) } } fun consume(obj: Foo) {}