Summary: Can't initialize const member in ctor if it is accessed
                    via this.member syntax
           Product: D
           Version: 2.020
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]

struct Integer
    this(int i)
        this.i = i; // fails: Error: this.i is not mutable

//  this(int ii)
//  {
//      i = ii; // ok, but I want member and argument names to match
//  }

    const int i;


Reply via email to