www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 6267] New: Can't increment alias this'd struct from ref return

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

           Summary: Can't increment alias this'd struct from ref return
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: dsimcha yahoo.com



2.054 beta regression.

struct Double1 {
    double val = 1;
    alias val this;
}

struct DNAHash(T) {
    T[] data;

    this(ubyte width) {}

    ref T opIndex(S)(S seq) {
        return data[0];
    }
}

void main() {
    auto hash = DNAHash!(Double1)(2);
    hash["f"]++;
}

test9.d(18): Error: var has no effect in expression (__pitmp5)

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


yebblies <yebblies gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch
                 CC|                            |yebblies gmail.com
            Summary|Can't increment alias       |Regression(2.054 beta):
                   |this'd struct from ref      |Can't increment alias
                   |return                      |this'd struct from ref
                   |                            |return



https://github.com/D-Programming-Language/dmd/pull/225

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


yebblies <yebblies gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED



https://github.com/D-Programming-Language/dmd/commit/5f6f697a4287494a6e8ae4f84bd5e7d28a115e1a

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