bug

dckl dick221z at yahoo.com
Thu Apr 19 12:22:41 PDT 2007


Well maybe 1.014 will fix the problem :)

Would it be possible to have it evaluate if cast to a wchar ?


Jascha Wetzel wrote:
> wrong - the wchar problem will not be fixed. DMD uses ambiguous CV types
> here (wchar[] = ushort[]) - bugzilla #1104
>
> Jascha Wetzel wrote:
>   
>> thanks!
>> both fixed in the next release
>>
>> dickl wrote:
>>     
>>> The following code will show the debugger break at places where break
>>> points are not set.
>>>
>>> Also, the wchar[] str doesn't evaluate properly.
>>>
>>> -----------------------------------------
>>>
>>>
>>> import std.stdio;
>>>  import std.utf;
>>>
>>>  int main()
>>>  {
>>>
>>>  // cast(wchar)str doesn't evaluate properly in ddbg 0.1.1
>>>      wchar [] str = toUTF16(cast(char [])"Hello");
>>>
>>>  // set a break point here (line 10)
>>>      writefln(str);
>>>  //single step (over) until inside of the foreach loop
>>>      Test t = new Test;
>>>
>>>
>>>      foreach(wch;t)
>>>      {
>>>          wchar c = wch;
>>>  // dispite doing a step (over), ddbg will stop inside of the onApply
>>>  // doing a continue from this point , ddbg will break on the foreach
>>> statement
>>>          writefln(c);
>>>      }
>>>
>>>      return 0;
>>>  }//end int main()
>>>
>>>
>>>  class Test
>>>  {
>>>     wchar [] str;
>>>
>>>    this()
>>>    {
>>>        str=toUTF16(cast(char [])"Hello Again");
>>>    }
>>>
>>>
>>>      int opApply(int delegate(inout wchar wch) dg)
>>>      {
>>>          int result=0;
>>>          for(uint i=0;i<str.length;i++)
>>>          {
>>>              result=dg(str[i]);
>>>              if(result)
>>>                  break;
>>>          }
>>>          return result;
>>>      }
>>>  }//end class Test
>>>       


More information about the Digitalmars-d-debugger mailing list