Bug 6405 – @safe doesn't work with multidimensional typesafe variadic parameters

Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
Other
OS
All
Creation time
2011-07-30T03:27:00Z
Last change time
2015-02-18T03:36:42Z
Keywords
rejects-valid, safe
Assigned to
nobody
Creator
bugzilla

Comments

Comment #0 by bugzilla — 2011-07-30T03:27:14Z
Test case: void foo(int[][] args...) @trusted { } void main() @safe { foo([1,2,3], [1,2,3]); } This should work, but compilation yields the following error: test.d(2): Error: variable test.main.__arrayArg3 void initializers for pointers not allowed in safe functions
Comment #1 by bugzilla — 2013-08-04T05:45:08Z
*** Issue 9918 has been marked as a duplicate of this issue. ***
Comment #2 by hsteoh — 2014-09-10T23:33:50Z
Works in git HEAD now. Please reopen if it's still not working for you.
Comment #3 by hsteoh — 2014-09-10T23:42:11Z
Comment #4 by bugzilla — 2014-09-11T06:52:58Z
Great! Minor nitpick: I am curious as to why you marked this as WORKSFORME. It's clear that this used to be a real bug, so shouldn't it be FIXED?
Comment #5 by andrej.mitrovich — 2014-09-11T08:02:35Z
(In reply to Lars T. Kyllingstad from comment #4) > Great! > > Minor nitpick: I am curious as to why you marked this as WORKSFORME. It's > clear that this used to be a real bug, so shouldn't it be FIXED? Only if it has an associated pull request, otherwise it's marked as worksforme.
Comment #6 by github-bugzilla — 2014-09-11T18:22:49Z
Comment #7 by github-bugzilla — 2015-02-18T03:36:42Z