interface Foo {} fun test(obj: Any) { if (obj is Foo) { consume(obj) } obj.hashCode() } fun consume(obj: Foo) {}