bug 142 -- fixed but dstress still failing

Brad Roberts braddr at puremagic.com
Fri Jan 19 00:56:26 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.
> 
> L.

Honestly, I don't know.  Templates aren't my forte at this point, but 
either the compiler is off or the dstress test is off, so _something_ is 
wrong.

Later,
Brad


More information about the Digitalmars-d-bugs mailing list