On Sunday, 14 July 2013 at 15:17:43 UTC, bearophile wrote:
test.d(4): Error: slice x[] is not mutable

This is almost 100% a bug. I have played a bit with this snippet and seems like void initialization breaks usual rule that you can cook const/immutable field in constructor (which is kind of guaranteed by TDPL). Simple test case:

class A
{
        immutable int x; // works
        // immutable int x = void; // works not

        this()
        {
                x = 42;
        }
}

Reply via email to