Weird type inference with EitherType

Hello here,

I’ve seen a weird behavior using js.Promise, with the type inference when using haxe.extern.EitherType.

Here’s a reproduction of the behavior :

The direct consequence is when you subscribe to a Promise, the type of the first parameter in the then callback is Unknown<0> instead of T.

Am I doing something wrong, or is that a bug with EitherType ?

That’s type inference at work, since the b argument itself is not typed: Type Inference - Haxe - The Cross-platform Toolkit