Names within namespaces can clash with one another
Brought to you by:
senexcanis
As per discussion here: https://sourceforge.net/p/cppheaderparser/discussion/837844/thread/8988295d/?limit=25#dc8f
namespace A {
class X;
};
namespace B {
class X;
};
A::X is not 'registered' as a fully qualified name in _CppHeader.classes. Hitting B::X in _CppHeader.evaulate_class_stack triggers a name collision error.
Similar clash happening with enums.
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: