Skip to content

Commit

Permalink
Fix tests and bootstrapped code
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
odersky committed Nov 19, 2018
1 parent 019dccb commit cb5c76e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ object Interactive {
import ast.tpd._

object Include {
case class Set private (val bits: Int) extends AnyVal {
case class Set private[Include] (val bits: Int) extends AnyVal {
def | (that: Set): Set = Set(bits | that.bits)
def except(that: Set): Set = Set(bits & ~that.bits)

Expand Down
2 changes: 1 addition & 1 deletion tests/pos/i4564.scala
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class BaseNCP[T] {
}

object NoClashPoly extends BaseNCP[Boolean]
case class NoClashPoly private(x: Int)
case class NoClashPoly (x: Int)


class BaseCP[T] {
Expand Down

0 comments on commit cb5c76e

Please sign in to comment.