Convincing oxygene compiler that argument satisfies constraint

Hey guys,

I’m messing around with Oxygene for Java Trial and the JMonkey Engine.
I’m trying to rewrite the Java beginner tutorials in Oxygene and now I’ve encountered a problem I don’t know how to tackle.

In Java the code is:

Code:
control = player.getControl(AnimControl.class);

which I’ve rewritten as:
Code:
control := AnimControl(player.Control[typeOf(AnimControl)]);

However the compiler complains that: 'Generic parameter doesn’t validate on “com.jme3.scene.control.Control” constraint for “T”'
But “AnimControl” inherits from “com.jme3.scene.control.AbstractControl” which implements the “com.jme3.scene.control.Control” interface.
Does anyone have an idea on how I can convince the compiler that “AnimControl” is a valid class?

The issue is logged for further review (#54897). Thank you for the report.
Best regards.