File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff 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+
16751686pure @safe nothrow @nogc unittest
16761687{
16771688 // support non-copyable items
You can’t perform that action at this time.
0 commit comments