Fix issue 6888.

This commit is contained in:
Maksim Zholudev 2011-11-03 18:09:32 +01:00
parent 276c84c574
commit fe1c21d04d

View file

@ -461,7 +461,7 @@ void handleOption(R)(string option, R receiver, ref string[] args,
enum isDelegateWithLessThanTwoParameters =
is(typeof(receiver) == delegate) &&
!is(typeof(receiver("", "")));
if (!isDelegateWithLessThanTwoParameters && !val && !incremental) {
if (!isDelegateWithLessThanTwoParameters && !(val.length) && !incremental) {
// Eat the next argument too. Check to make sure there's one
// to be eaten first, though.
enforce(i < args.length,