I get compile error with the following code for reading file?
``
package test
fun main(args : Array<String>) {
val file = java.io.File(args[0])
file.forEachLine{ line -> println(line) }
}
output>
ERROR: /Users/zemian/apps/kotlinc-0.4.177/src/Test.kt: (4, 7) Overload resolution ambiguity:
public final fun java.io.File.forEachLine(block : (jet.String) -> jet.Any) : Unit defined in kotlin.io
internal final fun java.io.File.forEachLine(charset : jet.String = …, closure : (jet.String) -> Unit) : Unit defined in kotlin.io
ERROR: /Users/zemian/apps/kotlinc-0.4.177/src/Test.kt: (4, 20) Cannot infer a type for this parameter. To specify it explicitly use the {(p : Type) => …} notation
exec() finished with COMPILATION_ERROR return code