aboutsummaryrefslogtreecommitdiff
path: root/tests/pos/leaks.scala
diff options
context:
space:
mode:
Diffstat (limited to 'tests/pos/leaks.scala')
-rw-r--r--tests/pos/leaks.scala10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/pos/leaks.scala b/tests/pos/leaks.scala
index dbb47d75a..3fe029c75 100644
--- a/tests/pos/leaks.scala
+++ b/tests/pos/leaks.scala
@@ -15,3 +15,13 @@ class Outer2 {
def foo: Outer2.x.type = Outer2.x // OK
}
}
+
+class Outer3 {
+ private val x: Int = 1
+
+ def meth: Unit = {
+ class Inner {
+ def foo: x.type = x // OK
+ }
+ }
+}