Hxb makes the issue visible when compiling this through compilation server:
interface Foo {
function foo<T>():T;
function bar<T>():T;
function baz<T>():T;
}
class Bar implements Foo {
public function foo() return null; // Warning: Unbound type parameter foo.T
public function bar<T>() return null; // Error: write_full_path hxb writer failure
public function baz<T>():T return null; // this is fine
}
While looking at what's happening (and so far failing addressing this issue...), I saw that cf_type was TFun([], TMono (Some (TAbstract(Null, [TMono (Some (TInst(T, [])))])))), with that T not having cl_kind = KTypeParameter ttp.
This is very much related to #11411. At this point I'm convinced that valid_redefinition needs a complete rewrite, but doing so requires a very particular state of being.
Hxb makes the issue visible when compiling this through compilation server:
While looking at what's happening (and so far failing addressing this issue...), I saw that
cf_type
wasTFun([], TMono (Some (TAbstract(Null, [TMono (Some (TInst(T, [])))]))))
, with thatT
not havingcl_kind = KTypeParameter ttp
.