class Vehicle def foo is nonvirtual print 'vehicle' class Car inherits Vehicle def foo base.foo # implies "is new" for this "def foo" since base is "nonvirtual" print 'car' class Test def main is shared print to sw=StringWriter() Car().foo s as String = sw.toString assert 'vehicle' in s assert 'car' in s v as Vehicle = Car() print to sw=StringWriter() v.foo # so v was really a Car, but since foo is nonvirtual: s = sw.toString assert 'vehicle' in s assert 'car' not in s