summaryrefslogtreecommitdiff
path: root/test/files/pos/virtpatmat_exist4.scala
blob: a04d0e3229b87f7044dab3eca4a02fb7917b920e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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 }
  }
}