interpret.c assertion failure on enum.stringof mixin
strtr
strtr at spam.com
Sun Feb 7 23:40:47 PST 2010
strtr Wrote:
> strtr Wrote:
>
> > enum { E };
> > void _mixin() {
> > writefln( E.stringof );
> > }
> > void func() {
> > mixin(_mixin);
> > }
> > Assertion failure: '!dim || (parameters && (parameters->dim == dim))' on line 140 in file 'interpret.c'
> >
> > At least I got a line number this time :)
>
> Had nothing to do with the enum :)
>
> void _mixin() {
> writefln( "" );
> }
> void func() {
> mixin(_mixin);
> }
mixins seem te choke on errors :(
enum E { A = 0, B, C }
char[] _mixin() {
return format( "s = ", (cast(E)1).stringof, ";" );
}
void func() {
char[] s;
mixin ( _mixin() );
}
Same assertion failure.
Anyways, how do I get the string "E.A" out of the int 0 ?
More information about the Digitalmars-d-learn
mailing list