www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 11800] New: alias this matching incorrectly changes lvalue-ness

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

           Summary: alias this matching incorrectly changes lvalue-ness
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: k.hara.pg gmail.com



Spin-off issue from: https://d.puremagic.com/issues/show_bug.cgi?id=5363#c4

Reduced test case:

struct A
{
    B b;
    alias b this;
}

struct B
{
    static struct Value {}
    Value value;
    alias value this;

    void foo(ref const B rhs)
    {
    }
}

void main()
{
    A a;
    B b;
    b.foo(a);  // line 22
}

test.d(22): Error: B(a.b.value) is not an lvalue

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 22 2013
next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11800


Kenji Hara <k.hara.pg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull



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

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 22 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11800




Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/d1fec048072baeae596bc984ad67de201594015c
fix Issue 11800 - alias this matching incorrectly changes lvalue-ness

https://github.com/D-Programming-Language/dmd/commit/30aee1d5978c7c0cca5a13741371584214f3772a


Issue 11800 - alias this matching incorrectly changes lvalue-ness

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 22 2013
prev sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11800


yebblies <yebblies gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |yebblies gmail.com
         Resolution|                            |FIXED


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