How to draw an association between class and cirle inside a namepsace?

0 votes
asked Apr 3 in Bug by hoborg91

It seems that ist is impossible to draw an association between class and cirle inside a namepsace. E.g., the following code produces strange result, while the same code without the namespace produces the expected result - a class and a circle connected by line.

@startuml
namespace Something {
  class MyClass
  circle IMyInterface
  IMyInterface -- MyClass
}
@enduml

1 Answer

0 votes
answered May 12 by The-Lu (2,580 points)
edited May 13 by The-Lu

Hello @hoborg91,

If we change the name 'circle' by the short name of interface '()':

namespace Something_2_OK  {
  class MyClass
  () IMyInterface
  IMyInterface -- MyClass
}

Or if we use directly the 'Lollipop interface' '()--':

namespace Something_3_OK {
  class MyClass
  IMyInterface ()-- MyClass
}

we observe the expected result:

See also: 'Lollipop interface' on https://plantuml.com/class-diagram

If that can help,
Regards,
Th.

...