aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2017-03-12 13:38:50 +0100
committerMartin Odersky <odersky@gmail.com>2017-03-12 13:38:57 +0100
commitc878f8101173d27fe9640bea5d1cea704061ca3c (patch)
treee257556f47a3b55fcda6b7984599d36ff83b3fbe /tests
parentb2d3b8938391516e81f18962e67f5bacf0aa2440 (diff)
downloaddotty-c878f8101173d27fe9640bea5d1cea704061ca3c.tar.gz
dotty-c878f8101173d27fe9640bea5d1cea704061ca3c.tar.bz2
dotty-c878f8101173d27fe9640bea5d1cea704061ca3c.zip
Fix #2066: Don't qualify private members in SelectionProto's...
... unless they would be accessible in the given context.
Diffstat (limited to 'tests')
-rw-r--r--tests/pos/i2066.scala15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/pos/i2066.scala b/tests/pos/i2066.scala
new file mode 100644
index 000000000..505e5e334
--- /dev/null
+++ b/tests/pos/i2066.scala
@@ -0,0 +1,15 @@
+class Foo
+
+object Test {
+ implicit class One(x: Foo) {
+ def meth: Unit = {}
+ }
+
+ implicit class Two(x: Foo) {
+ private def meth: Unit = {}
+ }
+
+ def test(foo: Foo): Unit = {
+ foo.meth
+ }
+}