There is a slight bug in FillForward; though it is very obscure and unlikely to be relevant to most users.
Consider the following code:
var result = new int?[] { null, 200, null, }
.FillForward(x => x == 200);
// expected
result == [ null, null, null ]
// actual
result == [ null, 200, null ]
The first value of null is not blank (null != 200); the second value is blank (200 == 200). Per the expectations of FillForward, the existing value of null should be carried forward to replace the 200 value. However, is (true, { } someSeed) rejects a null value, even if true, so we get the value of 200.
There is a slight bug in
FillForward
; though it is very obscure and unlikely to be relevant to most users.Consider the following code:
The first value of
null
is not blank (null != 200
); the second value is blank (200 == 200
). Per the expectations ofFillForward
, the existing value ofnull
should be carried forward to replace the200
value. However,is (true, { } someSeed)
rejects anull
value, even iftrue
, so we get the value of200
.Related: viceroypenguin/SuperLinq#372