use Foo.Bar namespace Foo.Bar class Bar get two as int is shared return 2 class Baz get two as int is shared return 2 class X def main is shared assert Bar.two == 2 # access a class named the same as its containing namespace assert Baz.two == 2