In my Rational number implementation, I find myself doing a lot of conversions of longs to ints and back again in order to, in particular around https://github.com/sanity/kotlin-rational/blob/master/src/main/java/rational/Rational.kt#L39. If I don't do these conversions I end up getting various Required: jet.Int Found: jet.Long errors (or the other way around).
Am I doing something wrong here? It seems that Kotlin is more sensitive to mismatches between Ints and Longs than Java - is this the case?