summaryrefslogtreecommitdiff
path: root/test/files/run/t0528.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/run/t0528.scala')
-rw-r--r--test/files/run/t0528.scala14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/files/run/t0528.scala b/test/files/run/t0528.scala
new file mode 100644
index 0000000000..b00ef4fa92
--- /dev/null
+++ b/test/files/run/t0528.scala
@@ -0,0 +1,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
+}