Comment #0 by bruno.do.medeiros+deebugz — 2006-09-26T07:21:26Z
Compiler stack overflow on recursive typeof in function declaration:
--------
void test( typeof(test) p) { }
----
Should give the error that test.p cannot be declared to be a function.
The DStress cases are failing again with dmd 1.051.
% dmd nocompile/t/typeof_11_B.d
nocompile/t/typeof_11_B.d(14): Error: forward reference to test
dmd: mtype.c:3674: virtual void TypeTypeof::toDecoBuffer(OutBuffer*): Assertion `0' failed.
zsh: abort dmd nocompile/t/typeof_11_B.d
Comment #4 by clugdbug — 2009-11-07T15:11:14Z
The regression occurred in DMD1.047. It worked fine in 1.046.
Comment #5 by clugdbug — 2009-11-17T06:39:09Z
This is caused by the addition of
void TypeTypeof::toDecoBuffer(OutBuffer *buf)
{
assert(0);
}
to mtype.c. This was added in DMD1.047, but wasn't added to D2, so D2 doesn't ICE.
PATCH: Just change the assert into an error message, eg:
error(loc, "invalid typeof expression");