you are not looking for automatic casts, but for the possibility to create a class that is compatible with basic types:
class Int(int realint) { inherit int; }
this is not yet possible, but it has been on my wish list for along time. it should be possible to inherit basic types or at least create classes that can pretend to be basic types and may be used in any place where basic types can be used now.
greetings, martin.