summaryrefslogtreecommitdiff
path: root/test/files/pos/t6601/UsePrivateValueClass_2.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/pos/t6601/UsePrivateValueClass_2.scala')
-rw-r--r--test/files/pos/t6601/UsePrivateValueClass_2.scala10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/files/pos/t6601/UsePrivateValueClass_2.scala b/test/files/pos/t6601/UsePrivateValueClass_2.scala
new file mode 100644
index 0000000000..461b8397b2
--- /dev/null
+++ b/test/files/pos/t6601/UsePrivateValueClass_2.scala
@@ -0,0 +1,10 @@
+object Test {
+ // After the first attempt to make seprately compiled value
+ // classes respect the privacy of constructors, we got:
+ //
+ // exception when typing v.a().==(v.a())/class scala.reflect.internal.Trees$Apply
+ // constructor V in class V cannot be accessed in object Test in file test/files/pos/t6601/UsePrivateValueClass_2.scala
+ // scala.reflect.internal.Types$TypeError: constructor V in class V cannot be accessed in object Test
+ def foo(v: V) = v.a == v.a
+ def bar(v: V) = v == v
+}