79736687

Date: 2025-08-15 17:33:49
Score: 0.5
Natty:
Report link

There are actually two issues here. How class names are parsed, and how namespaces are used.

Namespaces: at present, all these do is to visually group related items together. There is no relationship between classes and namespaces other than to group them within the same visual container.

Class Names: Mermaid uses the name as the unique identifier for the class node. Even if they are logically defined in separate namespaces, the overall list of class nodes will only have one entry with that name. If that name is used again, the original one will basically be "overwritten"

As far as mermaid is concerned, You declared the same class twice, and the last defined instance located within the namespace derived2 will "win"

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: Justin Greywolf