July 30, 2004 dmd crashing on templates | ||||
|---|---|---|---|---|
| ||||
In a rather silly attempt to make a sort of DIY implicit template instantiation I produced the following code:
# template bar(T)
# {
# void bar(T x) {}
# }
#
# template foo(alias X)
# {
# bar!(typeof(X))(X);
# }
#
# int i;
#
# void main()
# {
# foo!(i);
# }
Anyway, the compiler barfs with the following message:
template.c:1195: virtual void TemplateInstance::semantic(Scope*): Assertion `semanticdone == 0' failed.
Even worse, commenting out the first template definition gives a Segfault instead.
Nick
| ||||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply