From c604cc0b628f412e0e3747bd2ba4dd880ad0d9e4 Mon Sep 17 00:00:00 2001 From: Jack Koenig Date: Tue, 9 May 2023 15:35:59 -0700 Subject: [PATCH] SemanticDB requires private fields of case class to use "val" This does not seem to be required by Scala, but it is required by newer versions of SemanticDB (and thus to use Scala Metals). --- .../scala/chisel3/experimental/hierarchy/core/Definition.scala | 2 +- .../scala/chisel3/experimental/hierarchy/core/Instance.scala | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/core/src/main/scala/chisel3/experimental/hierarchy/core/Definition.scala b/core/src/main/scala/chisel3/experimental/hierarchy/core/Definition.scala index 0c3b2a93ae4..78e3ce0654f 100644 --- a/core/src/main/scala/chisel3/experimental/hierarchy/core/Definition.scala +++ b/core/src/main/scala/chisel3/experimental/hierarchy/core/Definition.scala @@ -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] { diff --git a/core/src/main/scala/chisel3/experimental/hierarchy/core/Instance.scala b/core/src/main/scala/chisel3/experimental/hierarchy/core/Instance.scala index d23c258a4d3..99cad5b4f59 100644 --- a/core/src/main/scala/chisel3/experimental/hierarchy/core/Instance.scala +++ b/core/src/main/scala/chisel3/experimental/hierarchy/core/Instance.scala @@ -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