Kotlin, wanna return a really long expression that barely fits the rules on the next line for some reason?
return
"Some Really Long Ass $interpolated String With Bullshit In It";
The second line gives a warning about unreachable code, and the first one shows an error because you can't return without a value unless the return type is Unit
View all comments
Show parent comment
59
u/TomGraphy Apr 15 '21
Exactly. We get readable code!