Describe the bug
Using foreach around a switch containing the case clauses will cause the variable tree to loose the _forEachIndex variable.
To Reproduce
Steps to reproduce the behavior:
- Execute code below
- Check output
Expected behavior
2. Output should resemble _testarray
Additional context
private _testarray = [1, 2, 3, 4 ,5, 6];
private _a = 3;
switch (_a) do
{
{
case _x: { hint str (_testarray select (_forEachIndex + 1)) };
} foreach _testarray
};
Describe the bug
Using foreach around a switch containing the case clauses will cause the variable tree to loose the _forEachIndex variable.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
2. Output should resemble
_testarrayAdditional context