bug 142 -- fixed but dstress still failing
Brad Roberts
braddr at puremagic.com
Sat Jan 20 12:07:10 PST 2007
Thomas Kuehne wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Frits van Bommel schrieb am 2007-01-19:
>> 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?
>
> The above code is missing a crucial information:
>
> 9 // __DSTRESS_ELINE__ 14
> 10
> 11 module dstress.nocompile.b.bug_template_610_A;
> 12
> 13 template A(alias T) {
> 14 void A(T){
> 15 }
> 16 }
> 17
> 18 void main(){
> 19 int i;
> 20 A(i);
> 21 }
>
> The template declaration in line 13 matches the request in line 20 but
> fails to instantiate due to line 14. If you look at DMD's output
> however, only line 20 is mentioned.
>
> bug_template_610_A.d(20): template dstress.nocompile.b.bug_template_610_A.A(alias T) does not match any template declaration
> bug_template_610_A.d(20): template dstress.nocompile.b.bug_template_610_A.A(alias T) cannot deduce template function from argument types (int)
>
> Thomas
>
>
> -----BEGIN PGP SIGNATURE-----
>
> iD8DBQFFse2PLK5blCcjpWoRAiIUAJ0Q4ZRv0HLxNyjQG8UIgaOteaA4BwCdGPF9
> uggdR/pfiBLaMLakMo4OFQE=
> =uUET
> -----END PGP SIGNATURE-----
Ok, so, um.. apologies for being obtuse. Is dmd still broken in your
mind? If so, then either a new bug needs to be filed or bug 142 needs
to be re-opened with details as to what's still wrong. Would you make
the choice and perform the action? :)
Thanks,
Brad
More information about the Digitalmars-d-bugs
mailing list