I was seeing error: cannot convert ‘Dynamic’ to ‘Color’ when passing a Color as a constructor argument.
A helpful bit of info from the haxe discord -
constructor arguments must be "dynamic compatible" on hxcpp which externs representing native structs won't be, try wrapping the struct in a cpp.Struct for the constructor argument
This explains why there are lots of this in the bindings -
typedef Foo = cpp.Struct<Bar>;
e.g. as seen in the commit, this allows Color to be passed as a constructor argument -
I was seeing
error: cannot convert ‘Dynamic’ to ‘Color’
when passing aColor
as a constructor argument.A helpful bit of info from the haxe discord -
This explains why there are lots of this in the bindings -
e.g. as seen in the commit, this allows
Color
to be passed as a constructor argument -