summaryrefslogtreecommitdiff
path: root/src/main/scala
diff options
context:
space:
mode:
authorJack Koenig2021-04-29 16:18:06 -0700
committerGitHub2021-04-29 16:18:06 -0700
commitc5861176887bfa529277e686df09a42aeceb6cd7 (patch)
tree82dc235e29ee615d063325eb66b96f54d652c4f6 /src/main/scala
parent4d8fed00225d15221cf32177ea9147b20d0b91f7 (diff)
Scala 2.13 support (#1751)
Diffstat (limited to 'src/main/scala')
-rw-r--r--src/main/scala/chisel3/aop/Select.scala8
-rw-r--r--src/main/scala/chisel3/aop/injecting/InjectingAspect.scala2
-rw-r--r--src/main/scala/chisel3/compatibility.scala2
-rw-r--r--src/main/scala/chisel3/util/MixedVec.scala4
4 files changed, 10 insertions, 6 deletions
diff --git a/src/main/scala/chisel3/aop/Select.scala b/src/main/scala/chisel3/aop/Select.scala
index e2689f39..b9ad808b 100644
--- a/src/main/scala/chisel3/aop/Select.scala
+++ b/src/main/scala/chisel3/aop/Select.scala
@@ -248,7 +248,7 @@ object Select {
case other =>
}
})
- predicatedConnects
+ predicatedConnects.toSeq
}
/** Selects all stop statements, and includes the predicates surrounding the stop statement
@@ -264,7 +264,7 @@ object Select {
case other =>
}
})
- stops
+ stops.toSeq
}
/** Selects all printf statements, and includes the predicates surrounding the printf statement
@@ -280,7 +280,7 @@ object Select {
case other =>
}
})
- printfs
+ printfs.toSeq
}
// Checks that a module has finished its construction
@@ -321,7 +321,7 @@ object Select {
}
} catch {
case e: ChiselException => i.getOptionRef.get match {
- case l: LitArg => l.num.intValue().toString
+ case l: LitArg => l.num.intValue.toString
}
}
diff --git a/src/main/scala/chisel3/aop/injecting/InjectingAspect.scala b/src/main/scala/chisel3/aop/injecting/InjectingAspect.scala
index 768680ed..c540fc83 100644
--- a/src/main/scala/chisel3/aop/injecting/InjectingAspect.scala
+++ b/src/main/scala/chisel3/aop/injecting/InjectingAspect.scala
@@ -89,7 +89,7 @@ abstract class InjectorAspect[T <: RawModule, M <: RawModule](
Seq(other)
}
- InjectStatement(ModuleTarget(circuit, module.name), ir.Block(stmts), modules, annotations)
+ InjectStatement(ModuleTarget(circuit, module.name), ir.Block(stmts.toSeq), modules, annotations)
}.toSeq
}
}
diff --git a/src/main/scala/chisel3/compatibility.scala b/src/main/scala/chisel3/compatibility.scala
index 3b9a3dcc..dde2321d 100644
--- a/src/main/scala/chisel3/compatibility.scala
+++ b/src/main/scala/chisel3/compatibility.scala
@@ -398,8 +398,8 @@ package object Chisel {
}
// Deprecated as of Chsiel3
- @throws(classOf[Exception])
object throwException {
+ @throws(classOf[Exception])
def apply(s: String, t: Throwable = null): Nothing = {
val xcpt = new Exception(s, t)
throw xcpt
diff --git a/src/main/scala/chisel3/util/MixedVec.scala b/src/main/scala/chisel3/util/MixedVec.scala
index a632ec3a..14d6be38 100644
--- a/src/main/scala/chisel3/util/MixedVec.scala
+++ b/src/main/scala/chisel3/util/MixedVec.scala
@@ -91,6 +91,10 @@ final class MixedVec[T <: Data](private val eltsIn: Seq[T]) extends Record with
eltsIn.foreach(e => requireIsChiselType(e))
}
+ // In Scala 2.13, this is protected in IndexedSeq, must override as public because it's public in
+ // Record
+ override def className: String = "MixedVec"
+
// Clone the inputs so that we have our own references.
private val elts: IndexedSeq[T] = eltsIn.map(_.cloneTypeFull).toIndexedSeq