www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 6656] New: static alias this broken in 2.055

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

           Summary: static alias this broken in 2.055
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: rejects-valid
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: thecybershadow gmail.com



15:59:19 PDT ---
Not sure if this is by design, this works in 2.054 but not in 2.055:

struct A { }

struct B
{
    static alias A this;
}

Possibly related: Issue 5622

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


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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|rejects-valid               |diagnostic
           Severity|regression                  |normal



This is not regression, is diagnostic issue.

Originally "alias this" only accepts a member symbol of an aggregate itself

of B.

By fixing bug 6561, it has been fixed in 2.055, invalid alias this always
prints "undefined identifier" error. In this case, we cannot use A as B's alias
this symbol, but we can lookup A from inside B. Then this is *diagnostic* issue
that the message is not sufficiently descriptive.


In 2.054, following code doesn't work.
----
struct A
{
    static void foo(){}
}
struct B
{
    static alias A this;
}
void main()
{
    B.foo();  // want to call A.foo, but fails
}
----
If this issue is 'regression', above code should work in 2.054, but doesn't.

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


Vladimir Panteleev <thecybershadow gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P2                          |P3



20:36:07 PDT ---
You're right, thanks. I was mistaken in thinking that it worked in 2.054.

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


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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch



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

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


Walter Bright <bugzilla digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bugzilla digitalmars.com
         Resolution|                            |FIXED



14:07:28 PDT ---
https://github.com/D-Programming-Language/dmd/commit/b8c6670efd260e156ad1a2b58a58aecd28537078

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