Bug 1806 – "const" makes typesafe variadic arguments not work properly.

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2008-01-25T04:29:00Z
Last change time
2015-06-09T01:14:30Z
Keywords
rejects-valid
Assigned to
bugzilla
Creator
burton-radons

Comments

Comment #0 by burton-radons — 2008-01-25T04:29:02Z
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); }
Comment #1 by bugzilla — 2008-03-07T00:26:24Z
Fixed dmd 2.012