class Test def main is shared t as Test = Test() if t is Test # .error. Maybe you should try "inherits" print 'use inherits not is'