TypeInfo.compare is not implemented

Leandro Motta Barros lmb at stackedboxes.org
Sat Nov 30 08:16:36 PST 2013


I am terribly sorry, this was a completely lazy question.

So far, I couldn't reproduce the problem in a small example. I'll look
deeper into this before posting again about it.

LMB




On Sat, Nov 30, 2013 at 12:07 PM, Shammah Chancellor
<anonymous at coward.com>wrote:

> On 2013-11-30 13:39:15 +0000, Leandro Motta Barros said:
>
>  Hello,
>>
>> I my FewDee game prototyping library (https://bitbucket.org/lmb/fewdee)
>> I ignored most of the usual reccomendations like "be careful with the GC,
>> it's slow" and "associative arrays are buggy in D, so avoid them". I just
>> used whatever I found convenient to have my stuff running with minimal
>> effort.
>>
>> So, I did something that may be an abuse of D's associative arrays:
>>
>> alias
>>   Tuple!(const(GameState), ALLEGRO_EVENT_TYPE)
>>   stateTypePair;
>>
>> // GameState is a class, ALLEGRO_EVENT_TYPE is
>> // some integral data type
>>
>> EventHandler[EventHandlerID][stateTypePair]
>>    _eventHandlers;
>>
>> // EventHandler is a delegate. EventHandlerID is
>> // an integral type.
>>
>> This used to work (surprisingly? :-) ) until very recently (when I
>> upgraded to DMD 2.064, it seems).
>>
>> Now, I am getting this
>>
>>    object.Error: TypeInfo.compare is not implemented
>>
>> when I try to use my '_eventHandlers' AA.
>>
>> So, any suggestions?
>>
>> Thanks a lot!
>>
>> LMB
>>
>
> DMD version?  Can you post a reduced example which produces the error.  I
> can't tell where a typeinfo would be getting used from that example.
>
> -Shammah
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20131130/9c37a44c/attachment-0001.html>


More information about the Digitalmars-d-learn mailing list