[Issue 4773] [PATCH] Rebindable should be castable to bool

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Oct 8 13:18:26 PDT 2010


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


Shin Fujishiro <rsinfu at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |rejects-valid
         Depends on|                            |5020


--- Comment #2 from Shin Fujishiro <rsinfu at gmail.com> 2010-10-08 13:18:00 PDT ---
Actually, it's explicitly castable to bool:

Rebindable!(const Object) r;
if (cast(bool) r) assert(0);
r = new Object;
if (!cast(bool) r) assert(0);

But dmd doesn't forward implicit boolean conversions in if (or other)
conditions to Rebindable's alias-this object.  Reported: bug 5020.

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