[Bug 142] Assertion failure: '0' on line 610 in file 'template.c'
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed May 17 14:38:40 PDT 2006
http://d.puremagic.com/bugzilla/show_bug.cgi?id=142
------- Comment #1 from fvbommel at wxs.nl 2006-05-17 16:38 -------
That definitely looks like a compiler bug.
That said, I'm pretty sure that code shouldn't compile anyway.
I think what you're trying to do is probably something like this:
// translation of "#define A(x) x=2".
// Note it can't be translated exactly because the macro doesn't
// have parentheses around it, so code like "A(x) + 2" _will_ do
// something different.
// (i.e. this is actually the translation of "#define A(x) (x=2)")
template A(T) {
void A(out T x) { x=2; }
}
void main()
{
int i;
A(i);
assert(i==2);
}
--
More information about the Digitalmars-d-bugs
mailing list