Skip to content
Browse files

A test case to guide the eventual fix for SI-6601.

This demonstrates the need for the reversion in the
previous commit.
  • Loading branch information...
1 parent 172f3f6 commit 5a2828c149d3c82c215a34e8586639ffea12a903 @retronym retronym committed Jan 27, 2013
View
1 test/files/pos/t6601/PrivateValueClass_1.scala
@@ -0,0 +1 @@
+class V private (val a: Any) extends AnyVal
View
10 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
+}

0 comments on commit 5a2828c

Please sign in to comment.
Something went wrong with that request. Please try again.