Hey
Is it possible to use generics with extern types?
Don’t know why, but it replace T
with Dynamic
type.
Is it a bug or I’m doing something wrong?
@:native('NativeObject.h')
extern class NativeObject
{
//...
public function setValue(value:Int):Void;
}
class HaxeObject<T:NativeObject>
{
private var ref:Pointer<T>; //generated as Pointer<Dynamic>. But I want to get Pointer<NativeObject>
public function new()
{
//...
}
public function setValue(value:Int):Void
{
ref.setValue(value);
}
}