| Summary: | Issue with i implicit and explicit i counters in for loops | ||
|---|---|---|---|
| Product: | [Modeling] Acceleo | Reporter: | Yvan Lussaud <yvan.lussaud> |
| Component: | Core | Assignee: | Project Inbox <acceleo-inbox> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | stephane.begaudeau, vlad.gheorghe |
| Version: | 3.0.0 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Whiteboard: | |||
First, do we agree that this is a real bug ? May I suggest to change the "i" to something less common, which also states that is an acceleo extension, like "acceleoCurrentIteration" It is indeed a real bug but we will not change "i" for something else because it would potentially break the compatibility with acceleo module already created. A patch has been contributed. The "i" variable should not create problems with an iteration variable named "i" anymore. The fix has been contributed on HEAD, it will be available for Acceleo 3.1 M7. 4 unit tests have been contributed to ensure that compilation errors do not re-appear. |
Writing the following code in a module create an error about i variable not defined : [for (Sequence{0..4})] [i/] [/for] [for (i : Integer | Sequence{0..4})] [i/] [/for] ----------------------- To fix this do not call a for variable i : [for (Sequence{0..4})] [i/] [/for] [for (Sequence{0..4})] [i/] [/for] or [for (Sequence{0..4})] [i/] [/for] [for (j : Integer | Sequence{0..4})] [j/] [/for] regards, Yvan.