aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjackkoenig2016-09-12 21:12:01 -0700
committerjackkoenig2016-09-12 21:30:35 -0700
commit117d82b38cc49c53422fe77e5c697792faaa6486 (patch)
tree677901d16da12df365bb78fe1bfa580f3b732faf /src
parent066dc5010a9ebaed276b064451e259318052865e (diff)
Add unapply for GroundType
Diffstat (limited to 'src')
-rw-r--r--src/main/scala/firrtl/ir/IR.scala3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main/scala/firrtl/ir/IR.scala b/src/main/scala/firrtl/ir/IR.scala
index 8f1cabf6..cdbf2fd7 100644
--- a/src/main/scala/firrtl/ir/IR.scala
+++ b/src/main/scala/firrtl/ir/IR.scala
@@ -329,6 +329,9 @@ abstract class GroundType extends Type {
val width: Width
def mapType(f: Type => Type): Type = this
}
+object GroundType {
+ def unapply(ground: GroundType): Option[Width] = Some(ground.width)
+}
abstract class AggregateType extends Type {
def mapWidth(f: Width => Width): Type = this
}