Oh, thank you. I tried { return reader.readLine() } instead of just { reader.readLine() }. It works. But I dreamed about something like visit(reader.readLine) {} so ticket you refered to is also correct.
Why “not a high-priority one”? C# does that, Java 8 does that, Obj-C does that, C+ does that, even AS3 does that It’s a really common feature, widely used e.g. for event handling (like C# style events) and after going through feature requests for Kotlin I can say it didn’t find any other with more votes (https://youtrack.jetbrains.com/issue/KT-6947), so it’s clearly something worth being added.
edit: Just noticed this thread is over 4 years old, so hopefully priorities have changed
Yes, I just got confused by the previous reply about it not being a high-priority thing (I read it as a reply from 12 March, not March 2012
But since I got your attention by making a fool out of myself, I’ve got another question to ask: Will this feature require Java 8 or not? I read somewhere your aim is to make Kotlin code 100% Java compatible, so Java programmers could call Kotling stuff without any problems and I’m not sure if this is doable on Java 6 JVM.