September 14, 2018
When having two loops it seems the variables are never show if the name is already used:

foreach(string a; x) { // a not shown in the locals or autos}

foreach(string a; y) { // a not shown }

renaming one of them to b, say, works as long as be wasn't used somewhere else.

September 16, 2018
This works for me with dmd 2.081 for -m64 and -m32mscoff

void foo()
{
	string[] x = ["1"];
	foreach(string a; x) {
		auto b = a;
	}
	string[] y = ["2"];
	foreach(string a; y) {
		auto b = a;
	}
}

Please show a full example and add some details about your environment (e.g. compiler version, VS version, target architecture).

On 15/09/2018 00:25, Josphe Brigmo wrote:
> When having two loops it seems the variables are never show if the name is already used:
> 
> foreach(string a; x) { // a not shown in the locals or autos}
> 
> foreach(string a; y) { // a not shown }
> 
> renaming one of them to b, say, works as long as be wasn't used somewhere else.
>