aboutsummaryrefslogtreecommitdiff
path: root/tests/run/i789.scala
blob: 99b081f0a8e757192b53ffeb8c612e88b5cdd2b6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
    trait Periods { self: Context =>

      def atPhase(id: Int): Unit = println(s"atPhase: $id")

    }

    class Phase(val id: Int)

    trait Phases { self: Context =>
      def atPhase(phase: Phase): Unit = self.atPhase(phase.id)
    }

    trait Context extends Phases with Periods

    object Test extends Context {

      def main(args: Array[String]) = atPhase(new Phase(2))

    }