http://d.puremagic.com/issues/show_bug.cgi?id=9792
Summary: length field of a const SortedRange
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: Phobos
AssignedTo: [email protected]
ReportedBy: [email protected]
--- Comment #0 from [email protected] 2013-03-23 07:50:35 PDT ---
I'd like this code to work:
import std.algorithm: sort;
void main() {
const data = [1, 5, 2].sort();
auto len = data.length;
}
DMD 2.063alpha gives:
temp.d(4): Error: mutable method std.range.SortedRange!(int[], "a <
b").SortedRange.length is not callable using a const object
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------