if(int a = 0) lowered to "if (int a = (int a = 1;) , a)" ?

aliak something at something.com
Wed Aug 8 11:58:50 UTC 2018


Found this out while just looking at lowerings. Wondering if 
anyone knows the semantics involved here and where they are 
documented?

And, is there anyway to do it with multiple variables?

I.e.

if (int a = 0, int b = 0) {
  // ...
}


Cheers,
- Ali


More information about the Digitalmars-d-learn mailing list