*** Bug 1063 has been marked as a duplicate of this bug. ***
Comment #2 by clugdbug — 2009-04-03T02:28:50Z
The first case no longer segfaults -- it stack overflows instead, and the second case now generates an error.
On DMD1.042, the first case displays:
fog.d(2): Error: alias fog.a recursive alias declaration
Stack overflow
and on DMD2.027, it gets caught in an infinite loop:
fog.d(2): Error: alias fog.a recursive alias declaration
fog.d(2): Error: alias fog.a recursive alias declaration
fog.d(2): Error: alias fog.a recursive alias declaration
fog.d(2): Error: alias fog.a recursive alias declaration
fog.d(2): Error: alias fog.a recursive alias declaration
Comment #3 by clugdbug — 2009-05-14T05:26:01Z
This is fixed in DMD2.030, but not in DMD1.045.
alias a b;
alias b a;
a y;
---
ice.d(544): Error: alias ice.a recursive alias declaration
Stack overflow
----------