Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » OclType and oclAsType issues
OclType and oclAsType issues [message #665974] Mon, 18 April 2011 12:25 Go to next message
Al  is currently offline Al Friend
Messages: 8
Registered: August 2010
Junior Member
Hi,

I am trying to do the following:

myClass := myMetaModel.rootObjects()[EClass]->asSequence()->first();

someObj.oclAsType(myClass);


The type checker rejects the second statement. The signature of oclAsType suggests that it requires an OclType. Isn't that removed from the new OCL spec? What am I supposed to cast myClass to, to make the typechecker happy?

thanks
Re: OclType and oclAsType issues [message #666036 is a reply to message #665974] Mon, 18 April 2011 17:38 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 4154
Registered: July 2009
Senior Member
Hi Al

oclAsType, as typically implemented, requires a type literal, e.g. MyClass.

oclAsType, as specified, is unimplementable; type expressions are not
adequately defined.

Regards

Ed Willink

On 18/04/2011 13:26, Al wrote:
> Hi,
> I am trying to do the following:
>
> myClass := myMetaModel.rootObjects()[EClass]->asSequence()->first();
>
> someObj.oclAsType(myClass);
>
>
> The type checker rejects the second statement. The signature of
> oclAsType suggests that it requires an OclType. Isn't that removed
> from the new OCL spec? What am I supposed to cast myClass to, to make
> the typechecker happy?
>
> thanks
>
Previous Topic:New to this field, how to start
Next Topic:Problem with hyphens in attributes
Goto Forum:
  


Current Time: Wed Nov 26 14:20:24 GMT 2014

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

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