summaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorJack Koenig2020-09-21 19:34:43 -0700
committerGitHub2020-09-22 02:34:43 +0000
commit9c4f14fb7347b5ca6afe777a9a4c5d9d15f9ac0d (patch)
treec21b72e902de8cb8660125e8baf39e0c94f8546c /src/main
parentc613c285c3e044370024a1b5cc0a0da1dbc3e5e6 (diff)
Support using switch without importing SwitchContext (#1595)
Diffstat (limited to 'src/main')
-rw-r--r--src/main/scala/chisel3/util/Conditional.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/scala/chisel3/util/Conditional.scala b/src/main/scala/chisel3/util/Conditional.scala
index 4938d075..e9d216f5 100644
--- a/src/main/scala/chisel3/util/Conditional.scala
+++ b/src/main/scala/chisel3/util/Conditional.scala
@@ -94,7 +94,7 @@ object switch {
def apply[T <: Element](cond: T)(x: => Any): Unit = macro impl
def impl(c: Context)(cond: c.Tree)(x: c.Tree): c.Tree = { import c.universe._
val q"..$body" = x
- val res = body.foldLeft(q"""new SwitchContext($cond, None, Set.empty)""") {
+ val res = body.foldLeft(q"""new chisel3.util.SwitchContext($cond, None, Set.empty)""") {
case (acc, tree) => tree match {
// TODO: remove when Chisel compatibility package is removed
case q"Chisel.`package`.is.apply( ..$params )( ..$body )" => q"$acc.is( ..$params )( ..$body )"