From 82362e2e102fb2f093739ebdafb090df3a738f57 Mon Sep 17 00:00:00 2001 From: Jasper Moeys Date: Wed, 6 Feb 2019 15:56:02 +0100 Subject: [PATCH] more test --- test/files/pos/caseclass_private_constructor.scala | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/test/files/pos/caseclass_private_constructor.scala b/test/files/pos/caseclass_private_constructor.scala index ee8d8a6fb62a..29b20b2bf4c9 100644 --- a/test/files/pos/caseclass_private_constructor.scala +++ b/test/files/pos/caseclass_private_constructor.scala @@ -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) @@ -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)