stupid errors

Derek Parnell derek at psych.ward
Mon Mar 20 07:30:36 PST 2006


On Tue, 21 Mar 2006 02:11:32 +1100, debugger  
<debugger_member at pathlink.com> wrote:

> Detecting errors like this:
>
> SomeType f(){
> SomeType result;
> result= SOMECONST;
> return result;
> }
>
> void g(){
> SomeType value;
> value= f();
> switch( value){
> case SOMECONST:
> assert( value == SOMECONST); // fails !!!
> }
> }
>
> is no reputation for any language.
>
> Changing the switch to cascaded if's worked okay, but for six years  
> developing
> this kind of bug is @!*$ and I am not interested in wasting my time

I just tried this using dmd v.150 and Windows XP and it works fine.

-- 
Derek Parnell
Melbourne, Australia



More information about the Digitalmars-d-bugs mailing list