aboutsummaryrefslogtreecommitdiff
path: root/tests/pending/run/t0528.scala
blob: ab0eea55d3ec1c541b46077c6f296acf2a605731 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import scala.language.{ existentials }
trait Sequ[A] {
  def toArray: Array[T forSome { type T <: A }]
}

class RichStr extends Sequ[Char] {
  // override to a primitive array
  def toArray: Array[Char] = Array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9')
}

object Test extends dotty.runtime.LegacyApp {
  val x: RichStr = new RichStr

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