aboutsummaryrefslogtreecommitdiff
path: root/tests/pos/valueclasses/t6601/UsePrivateValueClass_2.scala
blob: acd0dbef98c992c2673f6ce031669d15eab56e69 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
package t6601

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
}