|
Re: OCL type conformance [message #26842 is a reply to message #26758] |
Tue, 05 June 2007 14:03 |
Eclipse User |
|
|
|
Originally posted by: cdamus.ca.ibm.com
Hi, Sergey,
Invalid is defined as conforming to all other types in the OCL type system,
as is the case with OclVoid. Leaving aside the fact that it is impossible
to have two such types at the bottom of the type system, your second
example should not result in a parse error because OclInvalid should
inherit all of the following operations:
<> (object : OclAny) : Boolean
<> (s : Set) : Boolean
<> (s : Sequence) : Boolean
<> (b : Bag) : Boolean
from OclAny, Set(T), Sequence(T), and Bag(T), respectively (in addition to
the corresponding = operations).
Would you mind raising a bug for this? I don't expect that it would be
fixed at this late stage of the 1.1 release, as your first example does
work and is probably the most "natural" formulation (I hope?).
Thanks,
Christian
Sergey Boyko wrote:
> Hello,
>
> It seems that OCL standart library didn't define '=' and '<>' operations
> for CollectionTypes on OclInvalid type. This leads to non-symmetric
> behaviour of these operations.
>
> For example:
> Sequence{1} <> OclInvalid
> is correct
> but
> OclInvalid <> Sequence{1}
> produce syntax error:
> <ERROR in (operationCallExpCS): (Cannot find operation
> (<>(Sequence(Integer))) for the type (Invalid))>.
>
>
> Regards,
> Sergey.
|
|
|
Powered by
FUDForum. Page generated in 0.03158 seconds