diff options
Diffstat (limited to 'test/files/neg')
-rw-r--r-- | test/files/neg/t9849.check | 7 | ||||
-rw-r--r-- | test/files/neg/t9849.scala | 16 |
2 files changed, 23 insertions, 0 deletions
diff --git a/test/files/neg/t9849.check b/test/files/neg/t9849.check new file mode 100644 index 0000000000..7b47150846 --- /dev/null +++ b/test/files/neg/t9849.check @@ -0,0 +1,7 @@ +t9849.scala:14: error: method h in object O cannot be accessed in object p.O + O.h() + ^ +t9849.scala:15: error: method h$default$1 in object O cannot be accessed in object p.O + O.h$default$1 + ^ +two errors found diff --git a/test/files/neg/t9849.scala b/test/files/neg/t9849.scala new file mode 100644 index 0000000000..bcd18b6916 --- /dev/null +++ b/test/files/neg/t9849.scala @@ -0,0 +1,16 @@ +package p + +object O { + protected[p] def f(x: Int = 1) = x + private[p] def g(x: Int = 1) = x + private def h(x: Int = 1) = x +} + +object Test { + O.f() + O.f$default$1 + O.g() + O.g$default$1 + O.h() + O.h$default$1 +} |