Error with default argument in Source.getLines (Scala 2.8.0 RC1)
- by Derek
assuming I running Scala 2.8.0 RC1, the following scala code should print out the content of the file "c:/hello.txt"
for ( line<-Source.fromPath( "c:/hello.txt" ).getLines )
println( line )
However, when I run it, I get the following error
<console>:10: error: missing arguments for method getLines in class Source;
follow this method with `_' if you want to treat it as a partially applied function
Error occured in an application involving default arguments.
val it = Source.fromPath("c:/hello.scala").getLines
From what I understand, Scala should use the default argument "compat.Platform.EOL" for "getLines". I am wondering if I did wrong or is it a bug in scala 2.8
Thanks