Mercurial > projects > ldc
changeset 1610:4f63d530861f
Merge DMD r276: bugzilla 2229 ICE(template.c) instantiating an invalid...
bugzilla 2229 ICE(template.c) instantiating an invalid variadic template
with more than one argument.
---
dmd/template.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
author | Leandro Lucarella <llucax@gmail.com> |
---|---|
date | Wed, 06 Jan 2010 15:18:21 -0300 |
parents | 1d0220dd613a |
children | 3f728445fc42 |
files | dmd/template.c |
diffstat | 1 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/dmd/template.c Wed Jan 06 15:18:21 2010 -0300 +++ b/dmd/template.c Wed Jan 06 15:18:21 2010 -0300 @@ -814,7 +814,12 @@ else n = nargsi; - memcpy(dedargs->data, targsi->data, n * sizeof(*dedargs->data)); + /* Test case for nargsi instead of n: + * string foo(T...)() { return ""; } + * void main() { foo!(int, char)(); } + */ + //memcpy(dedargs->data, targsi->data, n * sizeof(*dedargs->data)); + memcpy(dedargs->data, targsi->data, nargsi * sizeof(*dedargs->data)); for (size_t i = 0; i < n; i++) { assert(i < parameters->dim);