java.Int64 and cs.Int64 conversion

How can java.Int64 and cs.Int64 values be converted into haxe Int?
For example

function foo(x: java.Int64): Int {
  return ???;
}

return cast x;

Thank you Ilir. It really makes sense :slightly_smiling_face:
Since from the point of view of Haxe both java.Int64 and Int are primitive types, a cast is enough and there is no need of a conversion function like haxe.Int64.toInt.