Looks very similar to bug 2325 (but 2325 is D1-only). Probably has the same
root cause.
Comment #2 by clugdbug — 2009-10-21T03:24:08Z
This one is trivial.
PATCH: template.c, line 4139. d needs to be initialized BEFORE the goto, because it is used in the error message.
Declaration *d = NULL;
TemplateDeclaration *td = sa->isTemplateDeclaration();
+ d = sa->isDeclaration();
if (td && td->literal)
{
goto L2;
}
- d = sa->isDeclaration();
if (d && !d->isDataseg() &&
#if DMDV2
!(d->storage_class & STCmanifest) &&
#endif
(!d->isFuncDeclaration() || d->isFuncDeclaration()->isNested()) &&
!isTemplateMixin())
{
L2:
Actually, I'm not sure why this goto is even there. It could just be a clause in the 'if' statement!