Bug 6279 – Regression(2.054 beta): array-vararg with pointer type not working in safe code
Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2011-07-09T19:10:00Z
Last change time
2011-07-10T11:17:42Z
Keywords
patch, rejects-valid
Assigned to
nobody
Creator
michel.fortin
Comments
Comment #0 by michel.fortin — 2011-07-09T19:10:27Z
This code doesn't work in @safe mode because of some compiler-generated code not being @safe:
@safe:
void foo(string[] val...) {
}
void main() {
foo("a", "b"); // Error: variable voidinitvararg.main.__arrayArg3 void initializers for pointers not allowed in safe functions
}