Closed reckart closed 2 years ago
We have two cases:
1) merging two basically identical types 2) a subtype re-defines a feature already defined by a supertype
For 1, I think there should not be a warning. If you think there should be one, why?
For 2, I am also not sure if there should be a warning - why do you think again there should be one?
The warnings do not come from merging directly, but from the adding features function. I find it good that you get warned when adding an existing feature or redefining something of the parent. Maybe I can disable warnings during merging, but you could do it also in application code.
Warnings should be generated things where we have a strong feeling that the programming is making a mistake or that the API is abused. Redefining a feature in a subtype could be a mistake. But as part of type system merging, it is not uncommon that types are defined in different type systems to be merged - and it is not a case of sub-type feature redefinition - it is a case of same-type feature redefinition with exactly the same definition. This case should not produce a slew of warnings.
Describe the bug When merging two almost-same type systems in cassis, it triggers tons of warnings in the line of
feature XXX already defined in YYY
.To Reproduce
Expected behavior The warning should only be triggered if a subtype redefines a feature that was already defined in a super-type (and even then it might be a bit annoying as it is). But if two identical or nearly identical types are merged, there should be no warning.
Please complete the following information:
Additional context https://github.com/averbis/averbis-python-api/pull/112