[Issue 6492] properties of alias this'd array overrides method

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Oct 23 02:33:55 PDT 2011


http://d.puremagic.com/issues/show_bug.cgi?id=6492


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

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


--- Comment #1 from Kenji Hara <k.hara.pg at gmail.com> 2011-10-23 02:32:51 PDT ---
This is sample-code bug.

import std.stdio;
struct F
{
    int[] g;
    alias g this;

    auto ptr()
    {
        write("ptr\n");  // print before return
        return g.ptr;
    }
}
void main()
{
    F a;
    auto p = a.ptr;
}

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


More information about the Digitalmars-d-bugs mailing list