-
Notifications
You must be signed in to change notification settings - Fork 34
Open
Labels
Description
Hi,
the DescriptorBuilder throws an exception if a property with the same name is defined in the inheritance chain of more than one of its super classes:
Error: property <any> already defined; override of <mh:AnotherRoot#mh:any> by <props:Root#props:any> not allowed without redefines
at DescriptorBuilder._fd7.r.DescriptorBuilder.assertNotDefined (lib/descriptor-builder.js:180:11)
at DescriptorBuilder._fd7.r.DescriptorBuilder.addNamedProperty (lib/descriptor-builder.js:138:10)
at DescriptorBuilder._fd7.r.DescriptorBuilder.addProperty (lib/descriptor-builder.js:53:8)
at DescriptorBuilder.<anonymous> (lib/descriptor-builder.js:227:12)
at forEach (node_modules/min-dash/dist/index.js:170:20)
at DescriptorBuilder._fd7.r.DescriptorBuilder.addTrait (lib/descriptor-builder.js:202:3)
at lib/registry.js:185:13
at Registry._0ac.r.Registry.mapTypes (lib/registry.js:165:3)
at traverseSuper (lib/registry.js:155:10)
at forEach (node_modules/min-dash/dist/index.js:170:20)
at Registry._0ac.r.Registry.mapTypes (lib/registry.js:162:3)
at Registry._0ac.r.Registry.getEffectiveDescriptor (lib/registry.js:184:8)
at Moddle._1b8.r.Moddle.getType (lib/moddle.js:97:32)
at Moddle._1b8.r.Moddle.create (lib/moddle.js:65:19)
at Context.<anonymous> (test/spec/properties.js:589:34)
at processImmediate (internal/timers.js:461:21)
I created a test case with a simplified hierarchy:

mh:MultipleInherited has two properties named any:
mh:AnotherRoot#anyprops:Root#any
and the DescriptorBuilder does not map them into seperate namespaces.
In my use-case, the problem occurs with the UMLDI meta-model, where all the diagram types inherit from UMLDI:UMLDiagram:

Regards,
Frank