summaryrefslogtreecommitdiff
path: root/test/files/run/t5688.scala
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan.moors@epfl.ch>2012-05-03 11:09:13 +0200
committerAdriaan Moors <adriaan.moors@epfl.ch>2012-05-03 13:35:23 +0200
commit7a5aaa9e23a98d60343cc0c4411b3fc395faa3ab (patch)
tree130f26f5dac9af4498d5f4604745c9209415db02 /test/files/run/t5688.scala
parent6300c3033e7b852c6cbef332af6085aac6150a70 (diff)
downloadscala-7a5aaa9e23a98d60343cc0c4411b3fc395faa3ab.tar.gz
scala-7a5aaa9e23a98d60343cc0c4411b3fc395faa3ab.tar.bz2
scala-7a5aaa9e23a98d60343cc0c4411b3fc395faa3ab.zip
SI-5703: normalize refined types more
to improve Array[T] java-interop with T[], normalize Object with Object{} to Object fix #SI-5688 by flattening refined types in parents updated check files to reflect flattening of refined types and updated position for refined types
Diffstat (limited to 'test/files/run/t5688.scala')
-rw-r--r--test/files/run/t5688.scala23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/files/run/t5688.scala b/test/files/run/t5688.scala
new file mode 100644
index 0000000000..f99bfb47d3
--- /dev/null
+++ b/test/files/run/t5688.scala
@@ -0,0 +1,23 @@
+object Test extends App {
+ trait T
+
+ trait TA
+ trait TB
+
+ class A extends T with TA
+ class B extends T with TB
+ class AB extends T with TA with TB
+ // Matching on _: TA with TB
+
+ val li: Vector[T] = Vector(new A, new B, new AB)
+
+ val matched = (for (l <- li) yield {
+ l match {
+ case _: TA with TB => "tab"
+ case _: TA => "ta"
+ case _: TB => "tb"
+ }
+ })
+
+ println(matched)
+} \ No newline at end of file