Multiple inheritance (several extends statements) is useful when a class wishes to include several orthogonal kinds of behavior and data, e.g. combining geometry and color. By writing several extends statements, multiple inheritance is achieved.
Show the flattened class with inheritance expanded:
A special kind of multiple inheritance is diamond inheritance, which is a problem that can arise when using multiple inheritance.
The potential problem is that we have diamond inheritance since the coordinate position defined by the fields x and y is inherited twice. In Modelica this is not a problem, since there is a rule stating that if several identical declarations or equations are inherited, only one of them is kept.
The Point2 definitions x, y, etc. are only present once despite being inherited twice, via VerticalLine and HorizontalLine.