Hello BCS,

I'm getting a seg-v (not an assert) at expression.c:6255 from some
template code. Is this a know issue or sould I put some work into
cutting it down?

FWIW this "fixes" the problem into an assert

Expression *DotTemplateInstanceExp::semantic(Scope *sc)
    printf("DotTemplateInstanceExp::semantic('%s')\n", toChars());
    Expression *eleft;
    Expression *e = new DotIdExp(loc, e1, ti->name);
    e = e->semantic(sc);
    if (e->op == TOKdottd)
        DotTemplateExp *dte = (DotTemplateExp *)e;
        TemplateDeclaration *td = dte->td;
        eleft = dte->e1;
        ti->tempdecl = td;
+       assert(ti->inst != NULL);
        Dsymbol *s = ti->inst->toAlias();
        Declaration *v = s->isDeclaration();
        if (v)
        {   e = new DotVarExp(loc, eleft, v);
            e = e->semantic(sc);
            return e;
        e = new ScopeExp(loc, ti);
        e = new DotExp(loc, eleft, e);
        e = e->semantic(sc);
        return e;
    else if (e->op == TOKimport)
    {   ScopeExp *se = (ScopeExp *)e;
        TemplateDeclaration *td = se->sds->isTemplateDeclaration();

Reply via email to