[Acceleo 3.7.7] How to [message #1802807] |
Sat, 16 February 2019 19:00  |
Eclipse User |
|
|
|
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 08:01] by Moderator
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02994 seconds