aboutsummaryrefslogtreecommitdiff
path: root/tests/pos/leaks.scala
blob: dbb47d75a722cc604458c1a739b68fa4979fc174 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
class Outer1 {
  private val x: Int = 1

  private class Inner {
    def foo: x.type = x // OK
  }
}

object Outer2 {
  private val x: Int = 1
}

class Outer2 {
  private class Inner {
    def foo: Outer2.x.type = Outer2.x // OK
  }
}