Bug 340407 - Bad uses for variables declared in for loop in lambda
Summary: Bad uses for variables declared in for loop in lambda
Status: RESOLVED DUPLICATE of bug 329620
Alias: None
Product: kdevelop
Classification: Applications
Component: Language Support: CPP (old) (other bugs)
Version First Reported In: 4.7.0
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-27 17:44 UTC by Nicolás Alvarez
Modified: 2014-10-27 17:46 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nicolás Alvarez 2014-10-27 17:44:56 UTC
In this code:
void foo() {
    []() {
        for (int num = 0; num < 53; num++) {
            bar(num);
        }
    };
}
the second and third instances of 'num'  in the for statement are highlighted as "declaration not found" errors, and not as uses of the 'int num' declaration. The 'num' in the bar() call is highlighted correctly.

This only occurs if the for loop is inside a lambda body.
Comment 1 Nicolás Alvarez 2014-10-27 17:46:23 UTC
I just found this was already reported...

*** This bug has been marked as a duplicate of bug 329620 ***