interface IFoo def foo class Test implements IFoo def foo pass def process(foo as IFoo) foo.foo # use System.Object methods: assert foo.equals(foo) assert foo.getHashCode <> 0 assert foo.toString.length assert foo.getType is .getType def main is shared Test().process(Test())