bug 142 -- fixed but dstress still failing

Frits van Bommel fvbommel at REMwOVExCAPSs.nl
Fri Jan 19 04:01:06 PST 2007


Lionello Lunesu wrote:
> Brad Roberts wrote:
>> http://d.puremagic.com/issues/show_bug.cgi?id=142 is marked as fixed 
>> as of 0.158.  However, looking at the dstress failures for 1.00, I see 
>> bug_template_610_[ABDE] all failing.  The error message has changed in 
>> more recent releases from what it used to be:
>>
>> dmd version 0.146 (something pre-0.158 that I had installed already)
>> $ ../dmd/146/dmd/bin/dmd -I../dmd/146/dmd/src/phobos bug_template_610_A.d
>> bug_template_610_A.d(10): template 'A(alias T)' is not a variable
>> bug_template_610_A.d(10): function expected before (), not A(alias T) 
>> of type int
>>
>> dmd version 1.00
>> $ dmd bug_template_610_A.d
>> bug_template_610_A.d(10): template 
>> dstress.nocompile.b.bug_template_610_A.A(alias T) does not match any 
>> template declaration
>> bug_template_610_A.d(10): template 
>> dstress.nocompile.b.bug_template_610_A.A(alias T) cannot deduce 
>> template function from argument types (int)
>>
>> $ cat -n bug_template_610_A.d
>>      1 module dstress.nocompile.b.bug_template_610_A;
>>      2
>>      3 template A(alias T) {
>>      4         void A(T){
>>      5         }
>>      6 }
>>      7
>>      8 void main(){
>>      9         int i;
>>     10         A(i);
>>     11 }
>>
> 
> Should that code even work? I'm no template guru (far from it), but I 
> have no idea what should be happening. The template should generate a 
> function called A, which in turn takes a parameter of type T, with T 
> being "i"? I don't get it.

No it shouldn't work. That's why the module name includes *nocompile*, I 
would think. The bug was that the compiler had an assertion failure when 
compiling that code (look at the summary), not that it didn't compile.
I'm not sure why dstress lists it as "FAIL" though. I'd think it should 
be "XFAIL"...

Thomas, can you shed any light on this?


More information about the Digitalmars-d-bugs mailing list