Example: template A(T) { private enum A = T.sizeof; } template B(T) { private enum C = T.sizeof; } void main() { enum x = A!int; enum y = B!int.C; } Expected: Compilation error (or warning) Actual: No error generated
**Within** a module its private members are accessible from its other members, this works like this by design. See point 2 here https://dlang.org/spec/attribute.html#visibility_attributes