Skip to content

Commit

Permalink
more test
Browse files Browse the repository at this point in the history
  • Loading branch information
Jasper-M committed Feb 6, 2019
1 parent 24194a1 commit 82362e2
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions test/files/pos/caseclass_private_constructor.scala
Expand Up @@ -3,7 +3,9 @@ object A {
def a = A(1).copy(2) // apply and copy are accessible in companion
}

case class B private (i: Int) // no user-defined companion object, should compile
case class B private (i: Int) { // no user-defined companion object, should compile
def b = B(1).copy(2) // apply and copy are accessible
}

object qualified_private {
case class A private[qualified_private] (i: Int)
Expand All @@ -13,7 +15,9 @@ object qualified_private {

def a = A(1).copy(2) // apply and copy are accessible in qualified_private object

case class B private[qualified_private] (i: Int) // no user-defined companion object, should compile
case class B private[qualified_private] (i: Int) { // no user-defined companion object, should compile
def b = B(1).copy(2) // apply and copy are accessible
}
}

case class C protected (i: Int)
Expand Down

0 comments on commit 82362e2

Please sign in to comment.