Thread overview
[Issue 8080] New: 'alias this' causes toString to be shadowed by aliased object
May 12, 2012
Kenji Hara
May 22, 2012
Walter Bright
May 10, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8080

           Summary: 'alias this' causes toString to be shadowed by aliased
                    object
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: nobody@puremagic.com
        ReportedBy: hsteoh@quickfur.ath.cx


--- Comment #0 from hsteoh@quickfur.ath.cx 2012-05-10 13:00:39 PDT ---
Code:
        struct S {
                short[4] data;
                alias this data;

                string toString() { ... }
        }
        ...
        S s;
        writeln(to!string(s));

In dmd 2.059 (I believe) and earlier, this calls S.toString(). However,
in git dmd, this calls data.toString() instead.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 12, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8080


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

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


--- Comment #1 from Kenji Hara <k.hara.pg@gmail.com> 2012-05-12 09:23:07 PDT ---
https://github.com/D-Programming-Language/phobos/pull/575

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 22, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8080



--- Comment #2 from github-bugzilla@puremagic.com 2012-05-22 12:40:09 PDT ---
Commit pushed to master at https://github.com/D-Programming-Language/phobos

https://github.com/D-Programming-Language/phobos/commit/40de9e601b3d80189d9e8b1f5b32d8b00270f610 fix Issue 8080 - 'alias this' causes toString to be shadowed by aliased object

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 22, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8080


Walter Bright <bugzilla@digitalmars.com> changed:

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


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