We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f955f8b commit 39717f1Copy full SHA for 39717f1
compiler/test/dotty/tools/utils.scala
@@ -47,7 +47,11 @@ def assertThrows[T <: Throwable: ClassTag](p: T => Boolean)(body: => Any): Unit
47
end assertThrows
48
49
def toolArgsFor(files: List[JPath], charset: Charset = UTF_8): List[String] =
50
- files.flatMap(path => toolArgsParse(Files.lines(path, charset).limit(10).toScala(List)))
+ files.flatMap(path => toolArgsParse {
51
+ val stream = Files.lines(path, charset)
52
+ try stream.limit(10).toScala(List)
53
+ finally stream.close()
54
+ })
55
56
// Inspect the first 10 of the given lines for compiler options of the form
57
// `// scalac: args`, `/* scalac: args`, ` * scalac: args`.
0 commit comments