[Issue 9792] New: length field of a const SortedRange
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Mar 23 07:50:37 PDT 2013
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 at puremagic.com
ReportedBy: bearophile_hugs at eml.cc
--- Comment #0 from bearophile_hugs at 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: -------
More information about the Digitalmars-d-bugs
mailing list