digitalmars.D.bugs - [Issue 9792] New: length field of a const SortedRange
- d-bugmail puremagic.com (25/25) Mar 23 2013 http://d.puremagic.com/issues/show_bug.cgi?id=9792
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: nobody puremagic.com ReportedBy: bearophile_hugs eml.cc 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: -------
Mar 23 2013