[Issue 19337] New: Cannot call std.algorithm.sort twice
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Oct 27 13:10:36 UTC 2018
https://issues.dlang.org/show_bug.cgi?id=19337
Issue ID: 19337
Summary: Cannot call std.algorithm.sort twice
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: regression
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: doob at me.com
The following example worked with DMD 2.081.0 but fails to compile with 2.082.0
and later:
import std.algorithm;
void main()
{
[1, 2,].sort.sort;
}
The error message is:
phobos/std/algorithm/sorting.d(1877): Error: cannot implicitly convert
expression assumeSorted(r) of type SortedRange!(int[], "a < b") to
SortedRange!(SortedRange!(int[], "a < b"), "a < b")
main.d(5): Error: template instance `std.algorithm.sorting.sort!("a < b",
cast(SwapStrategy)0, SortedRange!(int[], "a < b"))` error instantiating
--
More information about the Digitalmars-d-bugs
mailing list