D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 16632 - "for" statement treats scoped block in increment section as lambda
Summary: "for" statement treats scoped block in increment section as lambda
Status: RESOLVED DUPLICATE of issue 16672
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P1 minor
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-21 14:53 UTC by RazvanN
Modified: 2022-11-11 12:27 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description RazvanN 2016-10-21 14:53:31 UTC
How should the compiler treat this code?

int j;
for({j=2; int d = 3; } j+d<7; {j++; d++;}) {
}

A discussion regarding this code can be found at: 

http://forum.dlang.org/post/nud21i$o29$1@digitalmars.com
Comment 1 RazvanN 2022-11-11 12:27:27 UTC

*** This issue has been marked as a duplicate of issue 16672 ***