[Issue 1806] New: "const" makes typesafe variadic arguments not work properly.
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Jan 25 02:29:03 PST 2008
http://d.puremagic.com/issues/show_bug.cgi?id=1806
Summary: "const" makes typesafe variadic arguments not work
properly.
Product: D
Version: 2.010
Platform: PC
OS/Version: Windows
Status: NEW
Keywords: rejects-valid
Severity: normal
Priority: P2
Component: DMD
AssignedTo: bugzilla at digitalmars.com
ReportedBy: burton-radons at shaw.ca
This code:
void a (const int [] data...)
{
a (1);
}
Fails compilation with the mysterious error message "Error: __arrayArg1[0u] is
not mutable". Removing "const" allows it to compile; however, that makes this
not work:
void a (int [] data...)
{
const int [] foo;
a (foo);
}
--
More information about the Digitalmars-d-bugs
mailing list