[Issue 4733] Possible bugs caused by dynamic arrays in boolean evaluation context

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Dec 14 02:13:47 PST 2013


https://d.puremagic.com/issues/show_bug.cgi?id=4733



--- Comment #24 from Martin Nowak <code at dawg.eu> 2013-12-14 02:12:58 PST ---
Let me restate the obvious. The following code has a bug.

    if (arr)
        writeln(arr[0]);

I don't understand why this causes so much discussion.

> making this change will break existing code

Making this change will find broken code.
Please come up with a valid example.

--- Comment #25 from Martin Nowak <code at dawg.eu> 2013-12-14 02:13:17 PST ---
Let me restate the obvious. The following code has a bug.

    if (arr)
        writeln(arr[0]);

I don't understand why this causes so much discussion.

> making this change will break existing code

Making this change will find broken code.
Please come up with a valid example.

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list