mirror of
https://github.com/dlang/phobos.git
synced 2025-05-04 17:11:26 +03:00
Merge remote-tracking branch 'upstream/stable' into merge_stable
This commit is contained in:
commit
ecb5606acd
1 changed files with 12 additions and 1 deletions
|
@ -1384,7 +1384,7 @@ if (Ranges.length > 0 &&
|
|||
// force staticMap type conversion to Rebindable
|
||||
static struct ResultRanges
|
||||
{
|
||||
staticMap!(Rebindable, Ranges) fields;
|
||||
staticMap!(Rebindable, typeof(source)) fields;
|
||||
}
|
||||
auto sourceI(size_t i)() => rebindable(this.source[i]);
|
||||
auto resultRanges = ResultRanges(staticMap!(sourceI, aliasSeqOf!(R.length.iota))).fields;
|
||||
|
@ -1672,6 +1672,17 @@ pure @safe unittest
|
|||
assert(range.array == [S(5), S(6)]);
|
||||
}
|
||||
|
||||
/// https://issues.dlang.org/show_bug.cgi?id=24064
|
||||
pure @safe nothrow unittest
|
||||
{
|
||||
import std.algorithm.comparison : equal;
|
||||
import std.typecons : Nullable;
|
||||
|
||||
immutable Nullable!string foo = "b";
|
||||
string[] bar = ["a"];
|
||||
assert(chain(bar, foo).equal(["a", "b"]));
|
||||
}
|
||||
|
||||
pure @safe nothrow @nogc unittest
|
||||
{
|
||||
// support non-copyable items
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue