On 11/14/21 12:39 PM, Ogi wrote:
>On Sunday, 14 November 2021 at 16:51:01 UTC, kdevel wrote:
>Wrong: replace /* lots of code here */ with int x:
Hmm, it works indeed. Not sure if that’s intended, since the other way around is prohibited:
struct S { int x; }
void main ()
{
S s;
int x;
with (s) {
x = 42; //Error: with symbol `onlineapp.S.x` is shadowing local symbol `onlineapp.main.x`
}
}
Yes, it's intended.
I do get your point, but I don't think it's any more confusing than normal with
.
-Steve