On 8/10/2014 1:29 AM, Brian Schott wrote:
On Sunday, 10 August 2014 at 08:12:05 UTC, Walter Bright wrote:
No other statement construct works like that, there doesn't seem to be much
point to adding such a special case.

---
static if (true):
     alias A = B;
---

---
static if (true)
     alias A = B;
else:
     alias A = C;
     alias D = E;
---

C:\cbx>type foo.d
void foo(int B, int C, int E) {
  static if (true)
    alias A = B;
  else:
    alias A = C;
    alias D = E;
}


C:\cbx>dmd -c foo
foo.d(4): Error: found ':' instead of statement

Reply via email to