summaryrefslogblamecommitdiff
path: root/test/files/run/t8690.scala
blob: ab8b45b2a76f8dbc5368f2ce59469739d7b53d15 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12











                                                                                        
import scala.io.Source
import java.io.ByteArrayInputStream

object Test extends App {
  val txt = "abcdef"

  val in = new ByteArrayInputStream(txt.getBytes());
  val source = Source.fromInputStream(in);
  println(source.toString) // forces the BufferedSource to look at the head of the input

  println(source.mkString) // used to return "bcdef" ...
}