stupid errors

Regan Heath regan at netwin.co.nz
Tue Mar 21 21:26:10 PST 2006


On Wed, 22 Mar 2006 04:20:29 +0000 (UTC), debugger  
<debugger_member at pathlink.com> wrote:
> In article <1gjg8vs07wl1o$.tifrma18o0v$.dlg at 40tude.net>, Derek Parnell  
> says...
>> that's why we are trying to find and fix them.
> Who is we? I see, you are a member of the acknowledged crowd ... then  
> stay tuned
> until version 2.0 is released ... I want to see how many fingers will  
> point into
> different directions when that bug in the reference compiler is still
> undetected.
>> If you actually want this resolved, try showing us a complete  
>> (compilable)
>> example that exhibits the problem. Until then, I'm assuming you have  
>> made a
>> coding error rather than dmd is at fault. Prove otherwise.
> I work for money, not for reputation. Assume what you want, especially  
> that the
> other code example in my "stops compiling" post does not exhibit any  
> problem.
>
> If you want a proof: pay.
>
> Otherwise continue with your planless search and keep on whining about  
> people who know more than your acknowledged crowd.

If you've got nothing constructive to add stop posting, or, keep posting  
if it makes you happy just be prepared to be ignored as a "troll". Given  
the inflamatory nature of your post I am surprised you only got 1  
agressive response.

As Derek politely pointed out, you didn't post a complete example. Without  
a complete example there is no way for us to help you, in which case why  
post at all? (unless you're simply trolling?).

I've done my best to produce a complete example, here is what I came up  
with:

alias int SomeType;

SomeType f(){
	SomeType result;
	result = 1;
	return result;
}

void g(){
	SomeType value;
	value = f();	
	switch(value){
	case 1:
		assert(value == 1); // fails !!!
	}
}

void main()
{
	g();
}

I assume you meant for us to replace SOMECONST with an integer constant,  
if not, let me know what it was because nothing else I tried would  
compile. Using the code above I get no assert, which is the correct  
behaviour.

Regan



More information about the Digitalmars-d-bugs mailing list