I use opencsv to parse csv files, and my code is
while( (line = reader.readNext()) != null ) { .... }
I got a compiler warning saying:
In your case (line = reader.readNext()) is a functional literal that returns type Unit. You may rewrite the code as follows:
while( {line = reader.readNext(); line!= null} ) { .... }