eclipse-ocl / org.eclipse.ocl

Eclipse Public License 2.0
0 stars 0 forks source link

UML2AS does not support X extends Y template parameterization. #2131

Open eclipse-ocl-bot opened 3 weeks ago

eclipse-ocl-bot commented 3 weeks ago

| --- | --- | | Bugzilla Link | 566722 | | Status | NEW | | Importance | P3 normal | | Reported | Sep 07, 2020 05:11 EDT | | Modified | Sep 07, 2020 05:26 EDT | | Blocks | 509309 | | See also | 566594 | | Reporter | Ed Willink |

Description

Forked off from Bug 566594.

Gven a "Q extends T" template parameterization, the UML2AS diagnoses not-a-Class which naively seems correct. A ClassifierTemplateParameter.constrainingClassifier must be a real Classifier not a TemplateParameter. But in UML each TemplateParameter can have an examplar Classifier as its parameteredElement. So maybe once folded in the OCL Pivot it should be constrainingType rather than constrainingClass.

eclipse-ocl-bot commented 3 weeks ago

By Ed Willink on Sep 07, 2020 05:26

A quick glance at the code suggests that where a Class is required, it is because we need to check for feature existence in a minimum bound. So a getTransitiveConstrainingClassses helper may traverse a TemplateParameter chain to locate the Class that provides the minimum bound, else OclAny.