DustMite, a D test case minimization tool

Robert Jacques sandford at jhu.edu
Sun May 22 22:21:18 PDT 2011


On Mon, 23 May 2011 00:48:07 -0400, Vladimir Panteleev  
<vladimir at thecybershadow.net> wrote:

> On Mon, 23 May 2011 07:41:22 +0300, Robert Jacques <sandford at jhu.edu>  
> wrote:
>
>> Well, all I can say is that it doesn't throw on my install. (Windows,  
>> DMD 2.052) for either the patched nor un-patched appender  
>> implementation. What version are you using?
>
> 2.053.
>

Ah. I think I've tracked down the problem. The term is(Range ==  
Unqual!(T)[]) used to be true for a string and char[], and now it's  
properly being evaluated to false, which in turn causes the wrong static  
if branch to compile. So yes, this is a regression bug. You can fix by  
replacing the conditional (at line 1594) with:

         // note, we disable this branch for appending one type of char to
         // another because we can't trust the length portion.
         static if (is(typeof(_data.arr[0..1] = items[0..1])) &&
                    is(typeof(items.length) == size_t))

Or you can try out my patch to appender:
http://d.puremagic.com/issues/show_bug.cgi?id=5813
 


More information about the Digitalmars-d mailing list