void fn(out int a) { a = 2; int a; // shadows/hides parameter 'a', no error, from this point on, you cannot access the out parameter. a = 4; } void Test() { int res; fn(res); Print(res); // 2 }
void fn(int a) { a = 2; int a; // error, multi decl of 'a' a = 4; }
Is this intended?