aboutsummaryrefslogblamecommitdiff
path: root/tests/neg/companions.scala
blob: 4b2cf78df5abb05e5535a2c7d4ad8274f3e6643b (plain) (tree)
1
2
3
4
5
6
7
8
9
10









                       
                                   




      
object companionsNeg {

  def foo() = {

    class C {
      private val q = 2
    }

    { object C {
      private val p = 1
      println(new C().q)   // error
    }}
  }

}