mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-16 12:53:14 +01:00
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(-)
This commit is contained in:
@@ -814,7 +814,12 @@ MATCH TemplateDeclaration::deduceFunctionTemplateMatch(Loc loc, Objects *targsi,
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user