title: Haxe: How can I setup a class to store data in an array of type that I pass in the constructor
body: <p>I am coding in Haxe, Lime, OpenFl.  I am trying to set up a Class to store data in a Map, referenced by class instance. The class type is to be passed in the constructor, via inference. But I am quite new to all this and can't quite figure out the syntax, this is what I got so far:</p>
  
  <pre><code>class DynamicStore&lt;A&gt;
  {
      private var hashA:Map&lt;Class&lt;A&gt;,String&gt;;
  
      public function new&lt;A&gt;(paramA:Class&lt;A&gt;) {
          hashA = new Map();
      }
  }
  </code></pre>
  
  <p>But this gives me the following error:</p>
  
  <p>Abstract Map has no @:to function that accepts IMap&lt;Class&lt;DynamicStore.A&gt;, String&gt;</p>
  
  <p>Is there a way to do this?</p>