In Java we can usually perform an assignment within the while condition. However Kotlin complains about it. So the following code does not compile:
while
Here is the shortest solution powered by stdlib that also safely closes the reader:
reader.forEachLine { println(it) }