[Issue 6438] [CTFE] wrong error "value used before set" when slicing =void array

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Aug 6 09:42:02 PDT 2011


http://d.puremagic.com/issues/show_bug.cgi?id=6438



--- Comment #2 from Dmitry Olshansky <dmitry.olsh at gmail.com> 2011-08-06 09:41:59 PDT ---
I see, somehow I hadn't occured to me that it would require a lot of extra work
(and storage) to keep track of all uninitialized slots of array. 

Apart from variadic overload of insertInPlace I wouldn't expect this pattern to
be too common, so it won't be a big issue.

It was propmted by:
insertInPlace(a, x, [b,c]); //allocation here is plain ridiculous

so I proposed a more generalized version that allowed multiple arguments (that
also solves this particular problem):
insertInPlace(a, x, b, c); // initializes tmp array with b, c on stack and
inserts

-- 
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