I would expect it to be serializable since Map is supported. However, I see that in the macro getPropType skips over Map and goes straight to StringMap, "dereferencing" the abstract twice in one pass:
StringMap doesn't implement Serializable, so it is rejected.
I tried adding IntMap and StringMap in the TInst switch:
case "haxe.ds.IntMap":
var tk = getPropType(toType(macro : Int));
var tv = getPropType(pl[0]);
if( tv == null )
return null;
PMap(tk, tv);
case "haxe.ds.StringMap":
var tk = getPropType(toType(macro : String));
var tv = getPropType(pl[0]);
if( tv == null )
return null;
PMap(tk, tv);
but I may have done it incorrectly as this also fails with:
/home/ben/Dev/hxbit/hxbit/Macros.hx:458: characters 4-160 : Null<Map<String, Int>> should be Int
/home/ben/Dev/hxbit/hxbit/Macros.hx:458: characters 4-160 : Map<String, Int> should be Int
Given an abstract like this:
I would expect it to be serializable since Map is supported. However, I see that in the macro getPropType skips over Map and goes straight to StringMap, "dereferencing" the abstract twice in one pass:
StringMap doesn't implement Serializable, so it is rejected.
I tried adding IntMap and StringMap in the TInst switch:
but I may have done it incorrectly as this also fails with: