%module template_enum_ns_inherit %inline %{ namespace oss { enum Polarization { UnaryPolarization, BinaryPolarization }; template struct Interface_ { }; template struct Module { }; } %} namespace oss { %template(Interface_UP) Interface_; %template(Module_UPIUP) Module >; } %inline %{ namespace oss { namespace hello { struct HInterface1 : Interface_ // this works (with fullns qualification) { }; struct HInterface2 : Interface_ // this doesn't work { }; struct HModule1 : Module > { }; } } %}