Skip to content

Commit

Permalink
Merge branch 'master' into 3.4.x
Browse files Browse the repository at this point in the history
  • Loading branch information
chick committed Sep 22, 2020
2 parents cea53d0 + 9c4f14f commit 0a77486
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/src/wiki-deprecated/cookbook.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ State transitions are then handled with [`switch`](https://www.chisel-lang.org/a

```scala mdoc:silent:reset
import chisel3._
import chisel3.util._
import chisel3.util.{switch, is}
import chisel3.experimental.ChiselEnum

object DetectTwoOnes {
Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/chisel3/util/Conditional.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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 )"
Expand Down
2 changes: 1 addition & 1 deletion src/test/scala/chiselTests/SwitchSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ package chiselTests

import chisel3._
import chisel3.stage.ChiselStage
import chisel3.util._
import chisel3.util.{switch, is}

class SwitchSpec extends ChiselFlatSpec with Utils {
"switch" should "require literal conditions" in {
Expand Down

0 comments on commit 0a77486

Please sign in to comment.