Scala Unit type

Posted by portoalet on Stack Overflow See other posts from Stack Overflow or by portoalet
Published on 2010-06-17T14:55:26Z Indexed on 2010/06/17 15:33 UTC
Read the original article Hit count: 150

Filed under:
|

I use opencsv to parse csv files, and my code is

while( (line = reader.readNext()) != null ) { .... }

I got a compiler warning saying:

 comparing values of types Unit and Null using `!=' will always yield true
 [warn]     while( (aLine = reader.readNext()) != null ) {

How should I do the while loop?

© Stack Overflow or respective owner

Related posts about scala

Related posts about while-loops