March 23, 2013 [Issue 9792] New: length field of a const SortedRange | ||||
---|---|---|---|---|
| ||||
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 --- Comment #0 from bearophile_hugs@eml.cc 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: ------- |
Copyright © 1999-2021 by the D Language Foundation