Jason Smith - 2016-09-14

Similar clash happening with enums.

namespace A {
    enum X {x};
};

namespace B {
    enum X{x};
};

Resolver::global_enums is keyed off of the unqualified name, with a namespace key in the associated data. When B::X is registered, it is registered as X, wiping out A::X entry. This pops up in finalize_vars(), when '::' is being handled for instances of A::X, as a failed assert:

assert a in enum['namespace'].split('::')