diff options
| author | Aditya Naik | 2024-05-29 16:57:13 -0700 |
|---|---|---|
| committer | Aditya Naik | 2024-05-29 16:57:13 -0700 |
| commit | 165804ee58cb18443042b9655328278434ddedf4 (patch) | |
| tree | 4e167eff9e7b3ec09d73dbd9feaa6f9964cd8a68 /src/main/scala/firrtl/options/DependencyManager.scala | |
| parent | 57b8a395ee8d5fdabb2deed3db7d0c644f0a7eed (diff) | |
Add Scala3 support
Diffstat (limited to 'src/main/scala/firrtl/options/DependencyManager.scala')
| -rw-r--r-- | src/main/scala/firrtl/options/DependencyManager.scala | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/main/scala/firrtl/options/DependencyManager.scala b/src/main/scala/firrtl/options/DependencyManager.scala index ae22b4b4..32f6b3c9 100644 --- a/src/main/scala/firrtl/options/DependencyManager.scala +++ b/src/main/scala/firrtl/options/DependencyManager.scala @@ -17,7 +17,7 @@ case class DependencyManagerException(message: String, cause: Throwable = null) * @tparam A the type over which this transforms * @tparam B the type of the [[firrtl.options.TransformLike TransformLike]] */ -trait DependencyManager[A, B <: TransformLike[A] with DependencyAPI[B]] extends TransformLike[A] with DependencyAPI[B] { +trait DependencyManager[A, B <: TransformLike[A] & DependencyAPI[B]] extends TransformLike[A] with DependencyAPI[B] { import DependencyManagerUtils.CharSet override def prerequisites: Seq[Dependency[B]] = currentState @@ -52,7 +52,7 @@ trait DependencyManager[A, B <: TransformLike[A] with DependencyAPI[B]] extends /** Store of conversions between classes and objects. Objects that do not exist in the map will be lazily constructed. */ protected lazy val dependencyToObject: LinkedHashMap[Dependency[B], B] = { - val init = LinkedHashMap[Dependency[B], B](knownObjects.map(x => oToD(x) -> x).toSeq: _*) + val init = LinkedHashMap[Dependency[B], B](knownObjects.map(x => oToD(x) -> x).toSeq*) (_targets ++ _currentState) .filter(!init.contains(_)) .map(x => init(x) = x.getObject()) @@ -84,9 +84,9 @@ trait DependencyManager[A, B <: TransformLike[A] with DependencyAPI[B]] extends ): LinkedHashMap[B, LinkedHashSet[B]] = { val (queue, edges) = { - val a: Queue[Dependency[B]] = Queue(start.toSeq: _*) + val a: Queue[Dependency[B]] = Queue(start.toSeq*) val b: LinkedHashMap[B, LinkedHashSet[B]] = - LinkedHashMap[B, LinkedHashSet[B]](start.map((dToO(_) -> LinkedHashSet[B]())).toSeq: _*) + LinkedHashMap[B, LinkedHashSet[B]](start.map((dToO(_) -> LinkedHashSet[B]())).toSeq*) (a, b) } @@ -183,7 +183,7 @@ trait DependencyManager[A, B <: TransformLike[A] with DependencyAPI[B]] extends } /** Wrap a possible [[CyclicException]] thrown by a thunk in a [[DependencyManagerException]] */ - private def cyclePossible[A](a: String, diGraph: DiGraph[_])(thunk: => A): A = try { thunk } + private def cyclePossible[A](a: String, diGraph: DiGraph[?])(thunk: => A): A = try { thunk } catch { case e: CyclicException => throw new DependencyManagerException( |
