mirror of
https://github.com/dlang/phobos.git
synced 2025-05-07 19:49:36 +03:00
std.algorithm.iteration: Add test for issue 17264
Fixes Issue 17264 - [REG2.073] uniq fails with const elements
This commit is contained in:
parent
1e61c5cb6e
commit
113502af74
1 changed files with 8 additions and 0 deletions
|
@ -5047,6 +5047,14 @@ private struct UniqResult(alias pred, Range)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@safe unittest // https://issues.dlang.org/show_bug.cgi?id=17264
|
||||||
|
{
|
||||||
|
import std.algorithm.comparison : equal;
|
||||||
|
|
||||||
|
const(int)[] var = [0, 1, 1, 2];
|
||||||
|
assert(var.uniq.equal([0, 1, 2]));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Lazily computes all _permutations of $(D r) using $(HTTP
|
Lazily computes all _permutations of $(D r) using $(HTTP
|
||||||
en.wikipedia.org/wiki/Heap%27s_algorithm, Heap's algorithm).
|
en.wikipedia.org/wiki/Heap%27s_algorithm, Heap's algorithm).
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue