| Summary: | Bad uses for variables declared in for loop in lambda | ||
|---|---|---|---|
| Product: | [Applications] kdevelop | Reporter: | Nicolás Alvarez <nalvarez> |
| Component: | Language Support: CPP (old) | Assignee: | kdevelop-bugs-null |
| Status: | RESOLVED DUPLICATE | ||
| Severity: | normal | ||
| Priority: | NOR | ||
| Version First Reported In: | 4.7.0 | ||
| Target Milestone: | --- | ||
| Platform: | Compiled Sources | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
I just found this was already reported... *** This bug has been marked as a duplicate of bug 329620 *** |
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.