Skip to content

Commit fb753b3

Browse files
authored
Merge pull request #8800 from ibuclaw/merge_stable
merge stable Signed-off-by: Dennis <dkorpel@users.noreply.github.com> Merged-on-behalf-of: Nicholas Wilson <thewilsonator@users.noreply.github.com>
2 parents 9764704 + ecb5606 commit fb753b3

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

std/range/package.d

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1384,7 +1384,7 @@ if (Ranges.length > 0 &&
13841384
// force staticMap type conversion to Rebindable
13851385
static struct ResultRanges
13861386
{
1387-
staticMap!(Rebindable, Ranges) fields;
1387+
staticMap!(Rebindable, typeof(source)) fields;
13881388
}
13891389
auto sourceI(size_t i)() => rebindable(this.source[i]);
13901390
auto resultRanges = ResultRanges(staticMap!(sourceI, aliasSeqOf!(R.length.iota))).fields;
@@ -1672,6 +1672,17 @@ pure @safe unittest
16721672
assert(range.array == [S(5), S(6)]);
16731673
}
16741674

1675+
/// https://issues.dlang.org/show_bug.cgi?id=24064
1676+
pure @safe nothrow unittest
1677+
{
1678+
import std.algorithm.comparison : equal;
1679+
import std.typecons : Nullable;
1680+
1681+
immutable Nullable!string foo = "b";
1682+
string[] bar = ["a"];
1683+
assert(chain(bar, foo).equal(["a", "b"]));
1684+
}
1685+
16751686
pure @safe nothrow @nogc unittest
16761687
{
16771688
// support non-copyable items

0 commit comments

Comments
 (0)