In Modelica it is possible to define local classes nested inside a class, like Lpin in C1 below.
Local classes are considered as elements of the type of the class within which they are declared. The "field name" of such a local class is the class name, and the type is the type representation of the local class as a set of pairs according to our general type representation.
The local classes LocalClass1 and LocalClass2 could be moved outside the class Main with some changes of names.