Assertion failure: '!cases' on line 2620 in file 'statement.c'
nospam at nospam.com
Thu Jan 13 02:28:42 PST 2011
> == Quote from Don (nospam at nospam.com)'s article
>> %u wrote:
>>> Should I post it as a bug, even though I have no code to accompany it?
>>> I have no clue as to where to start my directed search for a minimal case.
>> Can you post the entire source code?
>> It's important that it be reproducible. It doesn't need to be minimal -
>> someone else can reduce it.
> I crashed it again :)
> Sorry, can't share the code..
> I don't really have any time atm, look at it again tomorrow.
It's in a switch statement somewhere.
It sounds as though this is a bug which involves multiple files, so
it'll be difficult to reduce it.
If you're able to compile DMD, change this line in statement.c line 2620:
Statement *SwitchStatement::semantic(Scope *sc)
tf = sc->tf;
+ if (cases) error("xxx");
assert(!cases); // ensure semantic() is only run once
and then you'll get the line number where the error is.
If you can provide the function which contains the switch statement,
there's a chance I could reproduce it.
More information about the Digitalmars-d-learn