www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - SEG-V at expression.c:6255, know issue?

reply BCS <none anon.com> writes:
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?
Jan 21 2010
parent BCS <none anon.com> writes:
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();
Jan 21 2010