open class RecA: RecB() open class RecB: RecA() open class SelfR: SelfR() fun test(f: SelfR) = f is RecA fun test(f: RecB) = f is RecA