digitalmars.D.bugs - [Issue 19337] New: Cannot call std.algorithm.sort twice
- d-bugmail puremagic.com (27/27) Oct 27 2018 https://issues.dlang.org/show_bug.cgi?id=19337
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 puremagic.com Reporter: doob 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 --
Oct 27 2018