[Issue 6777] alias this + cast(void*) == bug

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Oct 23 05:10:25 PDT 2011


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



--- Comment #1 from Kenji Hara <k.hara.pg at gmail.com> 2011-10-23 05:09:22 PDT ---
I think this is right behavior.
In D2, the implicit conversion from class type to void* is disabled. So

    auto p = cast(void*) c;

the expression c is transformed to c.s, and cause an error.

----

void main()
{
    Object o;
    void* p = o;
    // test.d(4): Error: cannot implicitly convert expression (o) of type
object.Object to void*
}

-- 
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