[Issue 11080] assert(`string`) should be forbidden
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Sep 21 10:58:25 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=11080
--- Comment #12 from monarchdodra at gmail.com 2013-09-21 10:58:23 PDT ---
(In reply to comment #11)
> Assert("string") is a bug. There should be no discussion here.
Why is it a bug? That's the discussion we're having. An array literal that
evaluates to null *will* trigger it. A user can test it.
void main()
{
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.
--
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