summaryrefslogtreecommitdiff
path: root/test/files/pos/virtpatmat_exist4.scala
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan.moors@epfl.ch>2012-03-17 12:15:37 +0100
committerAdriaan Moors <adriaan.moors@epfl.ch>2012-03-20 19:54:08 +0100
commit9e513a6d29f2cb060caf58ff5568d7955b96305a (patch)
tree2ae9ab7e38b0fa09aa93ebb18b277260db88a150 /test/files/pos/virtpatmat_exist4.scala
parentb046a6e3316df8b27ac31e71da1a139c800ccce7 (diff)
downloadscala-9e513a6d29f2cb060caf58ff5568d7955b96305a.tar.gz
scala-9e513a6d29f2cb060caf58ff5568d7955b96305a.tar.bz2
scala-9e513a6d29f2cb060caf58ff5568d7955b96305a.zip
[vpm] fix half of my existential troubles
no need for the clunky repackExistential pack the type of each case instead, since the skolems we've created shouldn't last beyond the case anyway this way we don't end up with fresh, incompatible, skolems for every case, but a neatly packed existential
Diffstat (limited to 'test/files/pos/virtpatmat_exist4.scala')
-rw-r--r--test/files/pos/virtpatmat_exist4.scala35
1 files changed, 35 insertions, 0 deletions
diff --git a/test/files/pos/virtpatmat_exist4.scala b/test/files/pos/virtpatmat_exist4.scala
new file mode 100644
index 0000000000..a04d0e3229
--- /dev/null
+++ b/test/files/pos/virtpatmat_exist4.scala
@@ -0,0 +1,35 @@
+trait Global {
+ trait Tree
+ trait Symbol { def foo: Boolean }
+}
+
+trait IMain { self: MemberHandlers =>
+ val global: Global
+ def handlers: List[MemberHandler]
+}
+
+trait MemberHandlers {
+ val intp: IMain
+ import intp.global._
+ sealed abstract class MemberHandler(val member: Tree) {
+ def importedSymbols: List[Symbol]
+ }
+}
+
+object Test {
+ var intp: IMain with MemberHandlers = null
+
+ val handlers = intp.handlers
+ handlers.filterNot(_.importedSymbols.isEmpty).zipWithIndex foreach {
+ case (handler, idx) =>
+ val (types, terms) = handler.importedSymbols partition (_.foo)
+ }
+}
+
+object Test2 {
+ type JClass = java.lang.Class[_]
+
+ def tvarString(bounds: List[AnyRef]) = {
+ bounds collect { case x: JClass => x }
+ }
+} \ No newline at end of file