I used IntelliJ's ability to convert Java code to Scala code which generally works quite well.

It seems that IntelliJ replaced all casts with calls to asInstanceOf.

Is there any valid usage of asInstanceOf[Int], asInstanceOf[Long] etc. for value types which can't be replaced by toInt, toLong, ...?

Edit
Report