Loïc Lamarque
06/13/2026, 1:01 PM12 / 0 behaves differently on every platform
On Kotlin/JS, 12 / 0 silently returns 0. On JVM and Native it throws ArithmeticException. That guard you wrote and tested on JVM? It is silently bypassed when the same code runs on JS.
We wrote a short post about what causes this and how the Integer type in Kotools Types 5.1.1 fixes it consistently across all three targets — including null-safe divOrNull and remOrNull variants for those who prefer not to catch exceptions.
Read it here 👇Didier Villevalois
06/13/2026, 1:21 PMephemient
06/13/2026, 2:10 PMMichael Paus
06/14/2026, 4:55 PMephemient
06/14/2026, 4:56 PMephemient
06/14/2026, 4:58 PM