M
Michel Michaud
Is this a known bug?
int main()
{
System::Collections::ArrayList a;
int i=0;
switch (i)
{
case 0 :
// { /* Would hide the error */
for each (int n in a)
System::Console::WriteLine(n.ToString());
// }
break;
case 1 : // The error is for this line
System::Console::WriteLine("n is not in scope here");
break;
}
}
The error is
error C2360: initialization of '$S1' is skipped by 'case' label
It's as if n would be declared outside of the for each (but it's
scope seems limited to it).
BTW is there an official "known bugs" list somewhere?
int main()
{
System::Collections::ArrayList a;
int i=0;
switch (i)
{
case 0 :
// { /* Would hide the error */
for each (int n in a)
System::Console::WriteLine(n.ToString());
// }
break;
case 1 : // The error is for this line
System::Console::WriteLine("n is not in scope here");
break;
}
}
The error is
error C2360: initialization of '$S1' is skipped by 'case' label
It's as if n would be declared outside of the for each (but it's
scope seems limited to it).
BTW is there an official "known bugs" list somewhere?