[Issue 6691] static constructor inside template cannot initialize immutable template members

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Sep 21 00:02:53 PDT 2011


http://d.puremagic.com/issues/show_bug.cgi?id=6691


bearophile_hugs at eml.cc changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bearophile_hugs at eml.cc


--- Comment #3 from bearophile_hugs at eml.cc 2011-09-21 00:02:26 PDT ---
Keep in mind that there are cases more important than this one that currently
don't work:


struct Foo {
    immutable int[1] arr;
    this(int x) {
        arr[0] = 1;
    }
}
auto f = Foo(1);
void main() {}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list