https://kotlinlang.org logo
#getting-started
Title
# getting-started
s

Snild

11/23/2017, 10:51 AM
Also, this compiles fine (let's hope the formatting works out..):
Copy code
fun forever(): String {
    while(true) {
        // stuck forever!
    }
}
i.e., the compiler accepts the lack of a return statement if it can determine that the end of the function cannot be reached.