Skip to main content



      Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » OCL Error 2
OCL Error 2 [message #45784] Mon, 21 August 2006 13:15 Go to next message
Eclipse UserFriend
In ValidationVisitorImpl I have found the following thing:
under
if (opcode == PredefinedType.CLOSURE) {

we can find:
if (TypeUtil.typeCompare(sourceElementType, iteratorElementType) < 0) {
}

My constellation is the following I have a
LogicalTool which is abstract and a ITBaseSystem which is a subcalss of
LogicalTool (ITBaseSystem->LogicalTool)

My expression is self->closure(uses) and context is a ITBaseSystem, the
uses set is defined in LogicalTool and I get the error message
Closure type (LogicalTool) does conform to source type (ITBaseSystem)
(If error 1 see newsgroup is fixed)

so the
if (TypeUtil.typeCompare(sourceElementType, iteratorElementType) < 0) {
}
does not chech the inheritance!

if I comment the "if" my evaluation is right
Chris
Re: OCL Error 2 [message #45814 is a reply to message #45784] Mon, 21 August 2006 13:21 Go to previous messageGo to next message
Eclipse UserFriend
ok the method "TypeUtil.typeCompare(sourceElementType, iteratorElementType)"
returns the following:
switch (TypeUtil.getRelationship(type1, type2)) {
case PredefinedType.SAME_TYPE:
return 0;
case PredefinedType.STRICT_SUBTYPE:
return -1;
case PredefinedType.STRICT_SUPERTYPE:
return 1;

so I think it should be:
if (TypeUtil.typeCompare(sourceElementType, iteratorElementType) > 0)

I have changed this in my code, how can I add this to repository?
Chris

Chris Lenz schrieb:
> In ValidationVisitorImpl I have found the following thing:
> under
> if (opcode == PredefinedType.CLOSURE) {
>
> we can find:
> if (TypeUtil.typeCompare(sourceElementType, iteratorElementType) < 0) {
> }
>
> My constellation is the following I have a
> LogicalTool which is abstract and a ITBaseSystem which is a subcalss of
> LogicalTool (ITBaseSystem->LogicalTool)
>
> My expression is self->closure(uses) and context is a ITBaseSystem, the
> uses set is defined in LogicalTool and I get the error message
> Closure type (LogicalTool) does conform to source type (ITBaseSystem)
> (If error 1 see newsgroup is fixed)
>
> so the
> if (TypeUtil.typeCompare(sourceElementType, iteratorElementType) < 0) {
> }
> does not chech the inheritance!
>
> if I comment the "if" my evaluation is right
> Chris
Re: OCL Error 2 [message #46179 is a reply to message #45814] Tue, 22 August 2006 09:32 Go to previous message
Eclipse UserFriend
I reported this error
https://bugs.eclipse.org/bugs/show_bug.cgi?id=154695
Re: OCL Error 2 [message #585775 is a reply to message #45784] Mon, 21 August 2006 13:21 Go to previous message
Eclipse UserFriend
ok the method "TypeUtil.typeCompare(sourceElementType, iteratorElementType)"
returns the following:
switch (TypeUtil.getRelationship(type1, type2)) {
case PredefinedType.SAME_TYPE:
return 0;
case PredefinedType.STRICT_SUBTYPE:
return -1;
case PredefinedType.STRICT_SUPERTYPE:
return 1;

so I think it should be:
if (TypeUtil.typeCompare(sourceElementType, iteratorElementType) > 0)

I have changed this in my code, how can I add this to repository?
Chris

Chris Lenz schrieb:
> In ValidationVisitorImpl I have found the following thing:
> under
> if (opcode == PredefinedType.CLOSURE) {
>
> we can find:
> if (TypeUtil.typeCompare(sourceElementType, iteratorElementType) < 0) {
> }
>
> My constellation is the following I have a
> LogicalTool which is abstract and a ITBaseSystem which is a subcalss of
> LogicalTool (ITBaseSystem->LogicalTool)
>
> My expression is self->closure(uses) and context is a ITBaseSystem, the
> uses set is defined in LogicalTool and I get the error message
> Closure type (LogicalTool) does conform to source type (ITBaseSystem)
> (If error 1 see newsgroup is fixed)
>
> so the
> if (TypeUtil.typeCompare(sourceElementType, iteratorElementType) < 0) {
> }
> does not chech the inheritance!
>
> if I comment the "if" my evaluation is right
> Chris
Re: OCL Error 2 [message #585957 is a reply to message #45814] Tue, 22 August 2006 09:32 Go to previous message
Eclipse UserFriend
I reported this error
https://bugs.eclipse.org/bugs/show_bug.cgi?id=154695
Previous Topic:org.eclipse.emf.ecore.xmi.FeatureNotFoundException Thrown
Next Topic:org.eclipse.emf.ecore.xmi.FeatureNotFoundException Thrown
Goto Forum:
  


Current Time: Fri May 09 02:28:37 EDT 2025

Powered by FUDForum. Page generated in 0.04170 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top