Assuming I'm running Scala 2.8.0 RC1, the following Scala code should print the contents 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 was wrong or is this a bug in Scala 2.8
thanks
defoo source share