aboutsummaryrefslogtreecommitdiff
path: root/tests/pos
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2017-02-01 21:30:23 +1100
committerMartin Odersky <odersky@gmail.com>2017-02-01 21:30:23 +1100
commitc1a37e13befe5a57ff2452e3a3470b1e0d8adb54 (patch)
tree24547d53c9779c7a5ef8c2251bab6c7476a963bb /tests/pos
parentd087448fdffff8f64a23d9db39445455cddc2fc6 (diff)
downloaddotty-c1a37e13befe5a57ff2452e3a3470b1e0d8adb54.tar.gz
dotty-c1a37e13befe5a57ff2452e3a3470b1e0d8adb54.tar.bz2
dotty-c1a37e13befe5a57ff2452e3a3470b1e0d8adb54.zip
Fix-#1723: Avoid private leaks on completion
As #1723 demonstrates, doing this at PostTyper is too late.
Diffstat (limited to 'tests/pos')
-rw-r--r--tests/pos/i1723.scala8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/pos/i1723.scala b/tests/pos/i1723.scala
new file mode 100644
index 000000000..75f7cd95c
--- /dev/null
+++ b/tests/pos/i1723.scala
@@ -0,0 +1,8 @@
+class A {
+ private val x: List[Int] = List(1)
+ def foo = x.head // foo inferred type is this.x.scala$collection$immutable$List$$A
+}
+
+class B extends A {
+ foo
+}