You are attempting to assign an integer variable to a long variable, but Kotlin compiler flags it as an error. Why?
All integers in Kotlin are of type Long
Long
You must wrap all implicit conversion in a try/catch block
There is no implicit conversion from Int to Long
Int
You can only assign Long to an Int, not the other way around