Community
Participate
Working Groups
The following module fails to resolve the recursive calls to the "recurse" query. None of the recursive calls fail if the parameters are passed "within parenthesis" instead of prepending the first argument. i.e; changing both calls to "recurse" from : eClass.recurse(i + 1) to recurse(eClass, i + 1) makes the resolution work. The parser seems to ignore the first argument (variable) when using the first form (though the very first call, "eClass.recurse(0)" is properly resolved?). [module testModule('http://www.eclipse.org/emf/2002/Ecore')/] [template public main(eClass : EClass)] [comment @main/] [file (eClass.name + '.txt', false, 'UTF-8')] [eClass.recurse(0)/] [/file] [/template] [query public recurse(eClass : EClass, i : Integer) : String = if (i = 2) then 'world' else if (i = 1) then ',' + eClass.recurse(i + 1) else 'hello' + eClass.recurse(i + 1) endif endif/]
A fix has been contributed on HEAD and R3_2_maintenance. An unit test has also been added to the test suite. It will be available for Acceleo 3.2.1 and 3.3.0.
Closing resolved bugs