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

           Summary: Templated ctor cannot set immutable member variables
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: simend...@gmail.com


--- Comment #0 from simendsjo <simend...@gmail.com> 2011-08-02 06:39:49 PDT ---
struct S {
    immutable int v;
    this()(int v) {
        this.v = v;
    }
}

void main() {
    S s = S(1);
}

Error: can only initialize const member v inside constructor
Error: template instance t.S.__ctor!(int) error instantiating

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

Reply via email to