Hey guys,
I'm updating some codes from Haxe 2.10 to Haxe 3 and I'm struggling a bit here with the new Maps and/or generic stuff!
Say I have a generic class which contains the member maps as follows.
class DAG<T>
{
var m:Map<T, String >;
var m1:Map<String, T>;
public function new()
{
// error: Abstract Map has no @:to function that accepts IMap<utility.DAG.T, Array<utility.DAG.T>>
m = new Map<T, String>();
// compiles fine
m1 = new Map<String, T>();
}
}
This will compile error with the error in the comment if T is used as the key type however it works fine as the value Type.
Any suggestions how I can pass a type into DAG to be the key type of the map?
Thanks
J