class Top pass class A inherits Top pass class B inherits Top pass class Test def main is shared # a common base type x = 5 y = 6 c = if(x < y, A(), B()) assert c inherits A c = Top()