www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 5397] New: Compiler error on struct with invariant and postblitz

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=5397

           Summary: Compiler error on struct with invariant and postblitz
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: alex.khmara gmail.com



---
This code:

module properties;

struct PropertyList {
    invariant() {
       assert(1);
    }

    this(this) {
        _props = [];
    }

    string[] _props;
}


gives compiler error:

Error: __result = this is not mutable
Error: __result = this is not an lvalue

Without invariant all works good.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 01 2011
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=5397


Alex Khmara <alex.khmara gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Platform|Other                       |x86



---
It seems that I cannot set proper DMD version - It was on DMD 2.0.51, Linux x86

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 01 2011
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=5397


Don <clugdbug yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |clugdbug yahoo.com.au
         Resolution|                            |DUPLICATE




 It seems that I cannot set proper DMD version - It was on DMD 2.0.51, Linux x86
You should just set version = D2 (the exact release number is useless information). Same issue as bug 3273. *** This issue has been marked as a duplicate of issue 3273 *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jan 01 2011