Skip to content

Commit

Permalink
Make all APIChange subclasses final.
Browse files Browse the repository at this point in the history
They should have been final from the beginning. We are fixing that
omission now.
  • Loading branch information
gkossakowski authored and eed3si9n committed Mar 21, 2014
1 parent 8d62e36 commit ce57563
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions compile/inc/src/main/scala/sbt/inc/Changes.scala
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ sealed abstract class APIChange[T](val modified: T)
* api has changed. The reason is that there's no way to determine if changes to macros implementation
* are affecting its users or not. Therefore we err on the side of caution.
*/
case class APIChangeDueToMacroDefinition[T](modified0: T) extends APIChange(modified0)
case class SourceAPIChange[T](modified0: T) extends APIChange(modified0)
final case class APIChangeDueToMacroDefinition[T](modified0: T) extends APIChange(modified0)
final case class SourceAPIChange[T](modified0: T) extends APIChange(modified0)
/**
* An APIChange that carries information about modified names.
*
* This class is used only when name hashing algorithm is enabled.
*/
case class NamesChange[T](modified0: T, modifiedNames: ModifiedNames) extends APIChange(modified0)
final case class NamesChange[T](modified0: T, modifiedNames: ModifiedNames) extends APIChange(modified0)

/**
* ModifiedNames are determined by comparing name hashes in two versions of an API representation.
Expand All @@ -39,7 +39,7 @@ case class NamesChange[T](modified0: T, modifiedNames: ModifiedNames) extends AP
* on whether modified name is implicit or not. Implicit names are much more difficult to handle
* due to difficulty of reasoning about the implicit scope.
*/
case class ModifiedNames(regularNames: Set[String], implicitNames: Set[String]) {
final case class ModifiedNames(regularNames: Set[String], implicitNames: Set[String]) {
override def toString: String =
s"ModifiedNames(regularNames = ${regularNames mkString ", "}, implicitNames = ${implicitNames mkString ", "})"
}
Expand Down

0 comments on commit ce57563

Please sign in to comment.