Hey guys,

I'm messing around with Oxygene for Java 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?