summaryrefslogtreecommitdiff
path: root/test-nsc/files/pos/bug287.scala
blob: 81a01951b259bcf27cea0a913425fa45dbb68363 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
object testBuf {
  class mystream extends java.io.BufferedOutputStream(new java.io.FileOutputStream("/dev/null")) {
    def w( x:String ):Unit = {
      val foo = new Array[byte](2);

      // write( byte[] ) is defined in FilterOutputStream, the superclass of BufferedOutputStream
      super.write( foo ); // error

      super.write( foo, 0, foo.length ); // this works however
    }
  }
}