class A is abstract def foo pass class B inherits A def bar pass class Test def main is shared B().bar