[Issue 4803] New: std.range.chain with const string arguments
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Sep 3 09:53:39 PDT 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4803
Summary: std.range.chain with const string arguments
Product: D
Version: D2
Platform: x86
OS/Version: Windows
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: bearophile_hugs at eml.cc
--- Comment #0 from bearophile_hugs at eml.cc 2010-09-03 09:53:22 PDT ---
A problem found by Pelle Mansson:
import std.range: chain;
void main() {
const string s = "hello";
auto r = chain(s, s);
}
Compiled with dmd 2.048:
...\dmd\src\phobos\std\range.d(1162): Error: can only initialize const member
_field_field_0 inside constructor
...\dmd\src\phobos\std\range.d(1162): Error: can only initialize const member
_field_field_1 inside constructor
I think a chain() has to work with const strings too (the items need to be
const if one of the iterables given to chain has const items).
--
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