<div dir="ltr"><div><div><div><div>Hello,<br><br></div>I my FewDee game prototyping library (<a href="https://bitbucket.org/lmb/fewdee">https://bitbucket.org/lmb/fewdee</a>) 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.<br>
<br></div>So, I did something that may be an abuse of D's associative arrays:<br><br>alias<br> Tuple!(const(GameState), ALLEGRO_EVENT_TYPE)<br> stateTypePair;<br><br></div>// GameState is a class, ALLEGRO_EVENT_TYPE is<br>
</div>// some integral data type<br><br>EventHandler[EventHandlerID][stateTypePair]<br> _eventHandlers;<br><div><div><div><br>// EventHandler is a delegate. EventHandlerID is<br>// an integral type.<br><br></div><div>This used to work (surprisingly? :-) ) until very recently (when I upgraded to DMD 2.064, it seems).<br>
<br></div><div>Now, I am getting this<br><br> object.Error: TypeInfo.compare is not implemented<br><br></div><div>when I try to use my '_eventHandlers' AA.<br><br></div><div>So, any suggestions?<br><br></div><div>
Thanks a lot!<br><br></div><div>LMB<br><br></div><div><br></div></div></div></div>