[Acceleo 3.1] Compilation error [message #724934] |
Tue, 13 September 2011 14:16  |
Sergio  Messages: 21 Registered: August 2010 Location: Cardedeu |
Junior Member |
|
|
Hi,
I have the next code with no problem in acceleo 3.0.*, but with compilation errors in 3.1
[query public listOfParametersIn(c : Class) : Bag(Parameter) = c.ownedOperation -> ownedParameter->select(p : Parameter | p.direction <> ParameterDirectionKind::return) -> asBag()/]
Quote:The compilation error: 2:18:2:19 "-" expected instead of "->"
How can this be done the right way?
Thank you!!
Sergio Sacristán
http://s2o-bcn.blogspot.com/
|
|
|
Re: [Acceleo 3.1] Compilation error [message #725184 is a reply to message #724934] |
Wed, 14 September 2011 07:26  |
|
Hi,
You have written "c.ownedOperation -> ownedParameter", but ownedParameter is not an attribute of a collection (I don't remember if "ownedOperation" returns a set, a bag, a sequence or an orderedset). You should try:
[query public listOfParametersIn(c : Class) : Bag(Parameter) = c.ownedOperation -> collect(o: Operation | o.ownedParameter)->select(p : Parameter | p.direction <> ParameterDirectionKind::return) -> asBag()/]
or
[query public listOfParametersIn(c : Class) : Bag(Parameter) = c.ownedOperation.ownedParameter->select(p : Parameter | p.direction <> ParameterDirectionKind::return) -> asBag()/]
Regards,
Stephane Begaudeau, Obeo
--
Twitter: @sbegaudeau
Google+: stephane.begaudeau
Blog: http://stephanebegaudeau.tumblr.com
Acceleo Documentation: http://docs.obeonetwork.com/acceleo
|
|
|
Powered by
FUDForum. Page generated in 0.02491 seconds