Atribuição não permitida enquanto expressão?

Em Java, geralmente podemos executar uma atribuição dentro dowhile condição. No entanto, Kotlin reclama disso. Portanto, o código a seguir não compila:

val br = BufferedReader(InputStreamReader(
        conn.inputStream))

var output: String
println("Output from Server .... \n")
while ((output = br.readLine()) != null) { // <--- error here: Assignments are not expressions, and only expressions are allowed in this context
    println(output)
}

De acordo com este outrofio, esta parece a melhor solução:

val reader = BufferedReader(reader)
var line: String? = null;
while ({ line = reader.readLine(); line }() != null) { // <--- The IDE asks me to replace this line for while(true), what the...?
  System.out.println(line);
}

Mas é isso?

questionAnswers(5)

yourAnswerToTheQuestion