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













                                                                                    
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] = Array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9')
}

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

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