[Issue 11080] assert(`string`) should be forbidden
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Sep 21 11:27:23 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=11080
bearophile_hugs at eml.cc changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |RESOLVED
Resolution| |INVALID
--- Comment #14 from bearophile_hugs at eml.cc 2013-09-21 11:27:21 PDT ---
(In reply to comment #12)
> enum string s1 = "string";
> enum string s2 = null;
>
> assert( s1);
> assert(!s2);
>
> assert( "");
> assert(!string.init);
> }
>
> These all seem like legit use cases to me.
Using the bang (!) forces a explicit boolean conversion, that's different from
implicit conversion from string to bool.
--
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