Skip to content

Commit cb5c76e

Browse files
committed
Fix tests and bootstrapped code
There were two occurrences where we exploited that a case class with a private constructor still had a public apply method. I believe both were mistakes.
1 parent 019dccb commit cb5c76e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

compiler/src/dotty/tools/dotc/interactive/Interactive.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ object Interactive {
2222
import ast.tpd._
2323

2424
object Include {
25-
case class Set private (val bits: Int) extends AnyVal {
25+
case class Set private[Include] (val bits: Int) extends AnyVal {
2626
def | (that: Set): Set = Set(bits | that.bits)
2727
def except(that: Set): Set = Set(bits & ~that.bits)
2828

tests/pos/i4564.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class BaseNCP[T] {
5151
}
5252

5353
object NoClashPoly extends BaseNCP[Boolean]
54-
case class NoClashPoly private(x: Int)
54+
case class NoClashPoly (x: Int)
5555

5656

5757
class BaseCP[T] {

0 commit comments

Comments
 (0)