[Acceleo 3.7.7] How to [message #1802807] |
Sun, 17 February 2019 00:00 |
|
This Acceleo code
[query public associationSignatures(ownedEnds : Sequence(Property)) : Sequence(Sequence(Property)) =
if ownedEnds->size() = 0 then
Sequence(Sequence(Property)){}
else
let ownedEnd : Property = ownedEnds->first() in
let last_ownedEnds : Sequence(Property) = ownedEnds->subSequence(2,ownedEnds->size()) in
let last_signatures : Sequence(Sequence(Property)) = associationSignatures(last_ownedEnds) in
let signatures_with_ownedEnd : Sequence(Sequence(Property))
= last_signatures->collect(signature : Sequence(Property)
| signature->prepend(ownedEnd)) in
if ownedEnd.lower = 0 then
last_signatures->union(signatures_with_ownedEnd)
else
signatures_with_ownedEnd
endif
endif
/]
causes this problem :
Init expression type does not conform to type of variable (signatures_with_ownedEnd).
How to correct it ?
I've tried things like ->asSequence(), convert in Collection, ... don't work.
Thanks for your help
[Updated on: Sun, 17 February 2019 13:01] Report message to a moderator
|
|
|
|
|
Re: How to [message #1802819 is a reply to message #1802818] |
Sun, 17 February 2019 08:42 |
|
Didier Garcin wrote on Sun, 17 February 2019 08:41Ed Willink wrote on Sun, 17 February 2019 06:02Hi
Without a more complete repo it is impossible to see what you are actually seeing, and even less possible to see how / where you tried asSequence().
Hi Ed
It's at compile-time, it appears. As a result, just need to create an Acceleo project with UML as meta-model.
Right ?
Cheers
[Updated on: Sun, 17 February 2019 08:50] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.03153 seconds