January 22, 2010 SEG-V at expression.c:6255, know issue? | ||||
---|---|---|---|---|
| ||||
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? |
January 22, 2010 Re: SEG-V at expression.c:6255, know issue? | ||||
---|---|---|---|---|
| ||||
Posted in reply to BCS | 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) { #if LOGSEMANTIC printf("DotTemplateInstanceExp::semantic('%s')\n", toChars()); #endif Expression *eleft; Expression *e = new DotIdExp(loc, e1, ti->name); L1: e = e->semantic(sc); if (e->op == TOKdottd) { DotTemplateExp *dte = (DotTemplateExp *)e; TemplateDeclaration *td = dte->td; eleft = dte->e1; ti->tempdecl = td; ti->semantic(sc); + 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(); |
Copyright © 1999-2021 by the D Language Foundation