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


Steven Schveighoffer <schvei...@yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |schvei...@yahoo.com


--- Comment #9 from Steven Schveighoffer <schvei...@yahoo.com> 2011-02-09 
10:18:44 PST ---
(In reply to comment #8)
> The patch causes this code to fail to compile:
> ----
> class S { }
> 
> void main()
> {
>     S s1 = new S;
>     const S s2 = new S;
>     assert(s1!=s2);
> }
> ---
> Even so, I think the patch is probably correct -- it's a problem with 
> opEquals.
> But this means that more work is required before this patch could be applied.

That code should fail to compile on the current compiler without patches,
because the prototype for opEquals for objects is:

bool opEquals(Object lhs, Object rhs);

Clearly, this should not accept any const objects.  Because opEquals is special
somehow, the compiler rams it through.

So yeah, that code is not indicative of the patch being bad.

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

Reply via email to