summaryrefslogblamecommitdiff
path: root/test/files/run/t6309.scala
blob: 7bbca63c2a6867feb18a895de108ebf857333372 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16















                                                    
trait A {
  def a: Int
}

object Test {
  def f(a: Int) = new {
    //private val b = a
    private[this] val b = a // crashes, sorry scalac
  } with A {
    def a = b
  }

  def main(args: Array[String]) {
    println(f(7).a)
  }
}