HeapsIO / hxbit

Haxe Binary serialization and network synchronization library
155 stars 30 forks source link

"Unsupported serializable type" with generics #67

Open kvbc opened 1 year ago

kvbc commented 1 year ago

The following code compiles with an error: "Unsupported serializable type Test.T", even though the type T is constrained as Serializable Compiled with haxe -m Main -lib hxbit --interp

// file "Main.hx"
package;

class Test<T: hxbit.Serializable> implements hxbit.Serializable {
    @:s public var test: T;
}

class Main {
    static public function main () {}
}

Is what I'm trying to achieve possible?