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 282f75b
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 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,11 @@ 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
}

def b = B(1).copy(2) // apply and copy are accessible in qualified_private object
}

case class C protected (i: Int)
Expand Down

0 comments on commit 282f75b

Please sign in to comment.