aboutsummaryrefslogtreecommitdiff
path: root/tests/untried/pos/virtpatmat_exist4.scala
diff options
context:
space:
mode:
Diffstat (limited to 'tests/untried/pos/virtpatmat_exist4.scala')
-rw-r--r--tests/untried/pos/virtpatmat_exist4.scala35
1 files changed, 35 insertions, 0 deletions
diff --git a/tests/untried/pos/virtpatmat_exist4.scala b/tests/untried/pos/virtpatmat_exist4.scala
new file mode 100644
index 000000000..728006276
--- /dev/null
+++ b/tests/untried/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 }
+ }
+}