Suppose I have the following function:

    public auto max(alias comp, Range)(Range r)
    in {
      assert(r !is null && !r.empty);
    }
    body {
      // ...
    }

When the function after a series of chained `map` operations, I get the
following error:

    Error: incompatible types for ((r) !is (null)):
'MapResult!(__lambda2, SInvoiceLine[])' and 'typeof(null)'

Of course if I remove `r !is null` from the `in` block, everything will
work.  But I'm curious; how can I check for a `null` in this case?

Thanks,
-- 
Bahman

Reply via email to