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: nob...@puremagic.com
        ReportedBy: bearophile_h...@eml.cc


--- Comment #0 from bearophile_h...@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: -------

Reply via email to