October 27, 2018 [Issue 19337] New: Cannot call std.algorithm.sort twice | ||||
|---|---|---|---|---|
| ||||
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 -- | ||||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply