To reproduce, create this function. void test() { []() { { for (int n = 0; n < 10; n++) { } } }; } The symbol 'n' is highlighted as being unknown in expressions 'n < 10' and 'n++'. This does not occur if the loop is moved outside the lambda.
*** Bug 340407 has been marked as a duplicate of this bug. ***
Created attachment 98501 [details] Bug has been resolved The attached bug has been resolved and does not occur anymore as suggested in the attached file.
Thanks for the feedback. Very useful.