Why compiler allow to put unreachable code after return?

We’re trying to be consistent in applying this principle: “Generally speaking, Kotlin does not report errors for code that has an unambiguous meaning and can be correctly executed.”

As for “very popular bug” and “feature that everybody loves”, I’ll just say “quotation needed”.

3 Likes