[Issue 4773] Rebindable should be castable to bool

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Jul 26 21:07:29 PDT 2011


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


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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |k.hara.pg at gmail.com
          Component|Phobos                      |DMD
           Platform|Other                       |All
         AssignedTo|rsinfu at gmail.com            |nobody at puremagic.com
            Summary|[PATCH] Rebindable should   |Rebindable should be
                   |be castable to bool         |castable to bool
         OS/Version|Windows                     |All
           Severity|enhancement                 |normal


--- Comment #3 from Kenji Hara <k.hara.pg at gmail.com> 2011-07-26 21:07:23 PDT ---
This is dmd issue.
Fixing bug5020 is incomplete, so property function + alias this is not
implicitly convertible to bool.

----
struct Rebindable
{
    Object obj;
    @property const(Object) get(){ return obj; }
    alias get this;
}

Rebindable r;
if (r) assert(0);
r.obj = new Object;
if (!r) assert(0);
----

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