[Issue 16548] Shadowing a variable not detected when nesting foreach with associative arrays
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Sep 22 20:13:02 UTC 2017
https://issues.dlang.org/show_bug.cgi?id=16548
Vladimir Panteleev <dlang-bugzilla at thecybershadow.net> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |accepts-invalid, diagnostic
Hardware|x86_64 |All
OS|Windows |All
--- Comment #1 from Vladimir Panteleev <dlang-bugzilla at thecybershadow.net> ---
Second variable doesn't need to be a foreach variable, either:
/////// test.d ///////
void main()
{
int x;
int[int] aa;
foreach (k, v; aa)
{
int x;
}
}
//////////////////////
--
More information about the Digitalmars-d-bugs
mailing list