If I compile this:
class CsvFile(pathToFile : String)
{
init
{
if (!File(pathToFile).exists())
return
// Do something useful here
}
}
I get an error:
Error:(18, 13) Kotlin: 'return' is not allowed here
I don't want to argue with the compiler, but I am curious about the motivation behind this restriction.