[Issue 5735] struct implicitly converted to boolean.

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Mar 15 17:57:02 PDT 2011


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


Iain Buclaw <ibuclaw at ubuntu.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ibuclaw at ubuntu.com


--- Comment #1 from Iain Buclaw <ibuclaw at ubuntu.com> 2011-03-15 17:53:51 PDT ---
Note, this is also the same issue for static arrays and unions.

int[1] arr;
assert(arr);       // type int[1u] does not have a boolean value
assert(0 || arr);  // OK

union B {}
B b;
assert(b);         // type B does not have a boolean value
assert(0 || b);    // OK


Regards

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