The Java compiler rejects it because it knows that RuntimeException will never be caught as it appears after Exception. The Kotlin equivalent doesn't even trigger a warning in the IDE. Does the Kotlin plugin for IntelliJ IDEA have at least an option to turn on a warning for this?
👀 2
e
ephemient
10/04/2022, 2:24 PM
in general unreachable code is a warning, not an error, in Kotlin (different from Java)