[Issue 6588] New: Struct d'tors + immutable elements doesn't work

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Sep 1 06:36:05 PDT 2011


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

           Summary: Struct d'tors + immutable elements doesn't work
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: dsimcha at yahoo.com
            Blocks: 6587


--- Comment #0 from David Simcha <dsimcha at yahoo.com> 2011-09-01 06:36:00 PDT ---
struct Task(Args...) {

    Args _args;

    this(Args args) {
        _args = args;
    }

    ~this() {}  // Bug goes away without this.

}

alias Task!(int function(immutable int), immutable(int)) F;

Error: can only initialize const member __args_field_1 inside constructor
Error: this is not mutable

-- 
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