[Issue 1782] Instantiating nested template with wrong instantiated parent template causes ICE
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Jan 11 17:10:47 PST 2008
http://d.puremagic.com/issues/show_bug.cgi?id=1782
------- Comment #1 from ary at esperanto.org.ar 2008-01-11 19:10 -------
I think the bug is in expression.c, line 5152:
---
error("template identifier %s is not a member of %s %s", id->toChars(),
s->kind(), s->ident->toChars());
---
In this case, s is an instance of TemplateInstance, and so s->ident is null. It
should be replaced by:
---
Identifier* id;
if (s->isTemplateInstance()) {
id = s->isTemplateInstance()->name;
} else {
id = s->ident;
}
error("template identifier %s is not a member of %s %s", id->toChars(),
s->kind(), id->toChars());
---
Or something similar to that.
--
More information about the Digitalmars-d-bugs
mailing list