Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mdt-ocl.dev] Working on the incorrect commonSuperType

Hi Christian,

Another consideration...It seems that AbstractTypeChecker.mutuallyComparable must be revised as well:

- Now, UnlimitedNatural shouldn't be comparable with Integer or Real.
- Before that method didn't take into account that OclAny is the common supertype of every type (if they are not collections). Fortunately, OclAny have the comparison operations (=, <>, <, >, <=, >=), so I suppose that every object (excepting the unrelated collections) should be considered as comparable. Here some questions:
    * Does this method have any other intention which I could be missing ??
    * How should the implementation evaluate a '>' operation when dealing with different classes which have the OclAny type as commonSuperType ?

Cheers !!!
Adolfo.

--

Adolfo Sánchez-Barbudo Herrera
adolfosbh(at)opencanarias(dot)com
C/Elías Ramos González, 4, ofc. 304
38001 SANTA CRUZ DE TENERIFE
Tel.: +34 922 240231 / +34 617 718268

Back to the top