From 117d82b38cc49c53422fe77e5c697792faaa6486 Mon Sep 17 00:00:00 2001 From: jackkoenig Date: Mon, 12 Sep 2016 21:12:01 -0700 Subject: Add unapply for GroundType --- src/main/scala/firrtl/ir/IR.scala | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') 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 } -- cgit v1.2.3