Introspection/Reflection/etc on Linux

Robert Jacques sandford at jhu.edu
Thu Nov 3 07:35:04 PDT 2011


On Thu, 03 Nov 2011 06:28:30 -0400, J Arrizza <cppgent0 at gmail.com> wrote:
> PS, this version works and prints "10" for the length:
>
>     string id = "somestring";
>     auto rid = retro(id);
>     //writeln(rid.length);
>     writeln(rid.source.length);
>
>
> On Thu, Nov 3, 2011 at 3:26 AM, J Arrizza <cppgent0 at gmail.com> wrote:
>
>> Robert,
>>
>> This stub shows the issue:
>>
>> import std.stdio;
>> import std.range;
>>
>> void main(string[] args)
>>   {
>>     string id = "somestring";
>>     auto rid = retro(id);
>>     writeln(rid.length);
>>   }
>>
>> $: dmd  dtest.d
>> dtest.d(8): Error: no property 'length' for type 'Result'
>>
>>
>> I haven't applied either patch you mentioned below. Neither patch seems to
>> address retro() or Result...
>>
>> John

Thanks John for tracking this down and finding a work around. It seems that the behavior of retro changed between 2.053 and 2.055. As you've probably already found, the errors are in the typeinfo2stringof function on line 245 of the currently uploaded variant.


More information about the Digitalmars-d mailing list