Try-with-resources or use()

use() function is now extension, e.g.:

myStream.use {
  val line = readLine()
}


This doesn’t appear to do what you think it does. If I control-click readLine here I’m taken to the global method that reads from stdin.