summaryrefslogblamecommitdiff
path: root/test/files/neg/t0528neg.scala
blob: 911745b763358a71de00475493ca9d6eab29e96f (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15














                                                                                
trait Sequ[+A] {
  def toArray: Array[T forSome {type T <: A}]
}

class RichStr extends Sequ[Char] {
  // override to a primitve array
  def toArray: Array[Char] = new Array[Char](10)
}

object Foo extends Application {
  val x: RichStr = new RichStr

  println(x.toArray) // call directly
  println((x: Sequ[Char]).toArray) // calling through the bridge misses unboxing
}