Skip to content

Commit

Permalink
SemanticDB requires private fields of case class to use "val" (#3270)
Browse files Browse the repository at this point in the history
This does not seem to be required by Scala, but it is required by newer
versions of SemanticDB (and thus to use Scala Metals).
  • Loading branch information
jackkoenig authored May 9, 2023
1 parent 36622f1 commit 08369ef
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import scala.annotation.nowarn
*
* @param underlying The internal representation of the definition, which may be either be directly the object, or a clone of an object
*/
final case class Definition[+A] private[chisel3] (private[chisel3] underlying: Underlying[A])
final case class Definition[+A] private[chisel3] (private[chisel3] val underlying: Underlying[A])
extends IsLookupable
with SealedHierarchy[A] {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ import scala.annotation.nowarn
*
* @param underlying The internal representation of the instance, which may be either be directly the object, or a clone of an object
*/
final case class Instance[+A] private[chisel3] (private[chisel3] underlying: Underlying[A]) extends SealedHierarchy[A] {
final case class Instance[+A] private[chisel3] (private[chisel3] val underlying: Underlying[A])
extends SealedHierarchy[A] {
underlying match {
case Proto(p: IsClone[_]) => chisel3.internal.throwException("Cannot have a Proto with a clone!")
case other => //Ok
Expand Down

0 comments on commit 08369ef

Please sign in to comment.