Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » OCL » cast to EFloat?
cast to EFloat? [message #830912] Wed, 28 March 2012 03:55 Go to previous message
Joel Greenyer is currently offline Joel Greenyer
Messages: 169
Registered: July 2009
Senior Member
Hi,
in our model transformation tool, we use OCL to specify constraints and assignments.
Recently, we discovered a problem with EFloat attributes---it seems that writing e.g. "10.0" evaluates to a double value, which then leads to a ClassCastException during assignments.

java.lang.ClassCastException: The value of type 'class java.lang.Double' must be of type 'class java.lang.Float'

is there any way to specify in OCL that a value should be cast to float/EFloat or do we have to provide for that in our transformation engine?

Thanks

Joel
 
Read Message
Read Message
Read Message
Previous Topic:Pivot OCL
Next Topic:Problem about OCLinEcore
Goto Forum:
  


Current Time: Sat May 18 16:30:55 EDT 2013

Powered by FUDForum. Page generated in 0.01709 seconds