interface IFoo def isSomething(x as IFoo) as bool class Foo implements IFoo def isSomething(x as IFoo) as bool return false get bar as Bar? return nil class Bar implements IFoo def isSomething(x as IFoo) as bool r = false if x inherits Foo # recursive call + if-inherits-on-a-param # used to give false compilation error r = .isSomething(x.bar to !) return r class Program def main pass