interface IFoo def foo class Test implements IFoo def foo pass def process(foo as IFoo) is shared foo.foo # use System.Object methods: assert foo.equals(foo) assert foo.getHashCode <> 0 assert foo.toString.length assert foo.getType is Test # used to cause bug in C# code gen assert foo.getType inherits Type # .warning. always def main is shared .process(Test())