cat > bug.d << CODE struct Array(T) { Array!(T) impConv() const { return *cast(typeof(return)*)this; } alias impConv this; struct Range { Array _arr; void front() inout { _arr[]; } } } alias AI = Array!int; CODE dmd -c bug
More specifically, stack overflow.
@BorisCarvajal created dlang/dmd pull request #12168 "Fix Issue 13667 - ICE: stack overflow using self-referencing cast ins…" fixing this issue: - Fix Issue 13667 - ICE: stack overflow using self-referencing cast inside recursive alias this method https://github.com/dlang/dmd/pull/12168
dlang/dmd pull request #12168 "Fix Issue 13667 - ICE: stack overflow using self-referencing cast ins…" was merged into master: - 2c436fee008ef59294402cc4085620e21be333b7 by Boris Carvajal: Fix Issue 13667 - ICE: stack overflow using self-referencing cast inside recursive alias this method https://github.com/dlang/dmd/pull/12168