[Issue 8233] New: std.array.array fails to compile with ranges of immutable elements which have a length property
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Jun 13 01:23:41 PDT 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8233
Summary: std.array.array fails to compile with ranges of
immutable elements which have a length property
Product: D
Version: unspecified
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: Optlink
AssignedTo: nobody at puremagic.com
ReportedBy: jmdavisProg at gmx.com
--- Comment #0 from Jonathan M Davis <jmdavisProg at gmx.com> 2012-06-13 01:25:48 PDT ---
This fails to compile
import std.array;
void main()
{
dstring d = "hello world";
auto e = array(d);
}
giving
/home/jmdavis/dmd2/linux/bin/../../src/phobos/std/array.d(55): Error: result[i]
isn't mutable
q.d(6): Error: template instance std.array.array!(immutable(dchar)[]) error
instantiating
If you use string rather than dstring, it works just fine. The line that fails
to compile in std.array.array is in the hasLength!Range portion, so clearly
it's an issue specifically with ranges which have a length property.
--
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