--- Comment #1 from Maksim Zholudev <> 2011-11-03 09:58:06 
PDT ---
The bug is found!

In std/getopt.d:

If the option is not long and bundling is forbidden lines 587-588 are executed.
If arg looks like "-t" value is empty but !value is false, i.e. in the
following code all asserts are true:

void main()
    string s = "t";
    string s1 = s[1..$];
    string s2 = null;

    assert(s1 == null);
    assert(s2 == null);
    assert(!s1 == false); // Why?
    assert(!s2 == true);

Hence in std/getopt.d in the line 464:
!val is false and val is empty when we come to line 519 and try to access its

I'm going to fix it right now.
But the behavior of empty slices looks like a bug of the compiler.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to