aboutsummaryrefslogtreecommitdiff
path: root/tests/neg
diff options
context:
space:
mode:
authorodersky <odersky@gmail.com>2017-03-12 22:18:00 +0100
committerGitHub <noreply@github.com>2017-03-12 22:18:00 +0100
commitb3194406d8e1a28690faee12257b53f9dcf49506 (patch)
tree8f91b32b052f4244df744e8b2fd2416821a836fc /tests/neg
parente5e2f826b2db7a124d7f59647047d3e0bec5f4ab (diff)
parent32617344f90001faa65a020f54d309d076da8fcc (diff)
downloaddotty-b3194406d8e1a28690faee12257b53f9dcf49506.tar.gz
dotty-b3194406d8e1a28690faee12257b53f9dcf49506.tar.bz2
dotty-b3194406d8e1a28690faee12257b53f9dcf49506.zip
Merge pull request #2080 from dotty-staging/fix#-2066
Fix #2066: Don't qualify private members in SelectionProto's...
Diffstat (limited to 'tests/neg')
-rw-r--r--tests/neg/i2066.scala27
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/neg/i2066.scala b/tests/neg/i2066.scala
new file mode 100644
index 000000000..0081cec07
--- /dev/null
+++ b/tests/neg/i2066.scala
@@ -0,0 +1,27 @@
+class Foo
+
+object Test {
+ implicit def two(x: Foo): Two = new Two(x)
+
+ class Two(x: Foo) {
+ private def meth: Unit = {}
+
+ def test2(foo: Foo): Unit = {
+ foo.meth // error
+ }
+ }
+}
+
+
+object Test2 {
+
+ class Two(x: Foo) {
+ implicit def two(x: Foo): Two = new Two(x)
+
+ private def meth: Unit = {}
+
+ def test2(foo: Foo): Unit = {
+ foo.meth // error
+ }
+ }
+}