From a1af6b7099f1207c67db3561507615fd18c487ef Mon Sep 17 00:00:00 2001 From: Megan Wachs Date: Fri, 7 Jan 2022 15:28:56 -0800 Subject: Add a Select.ios that works with Definition/Instance, fix isA behavior (#2315) * New Feature: Add a Select.ios that works with Definition/Instance * BugFix: isA now truly ignores type parameters--- core/src/main/scala/chisel3/experimental/hierarchy/Hierarchy.scala | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'core/src') diff --git a/core/src/main/scala/chisel3/experimental/hierarchy/Hierarchy.scala b/core/src/main/scala/chisel3/experimental/hierarchy/Hierarchy.scala index 503e437b..4b8d3ccc 100644 --- a/core/src/main/scala/chisel3/experimental/hierarchy/Hierarchy.scala +++ b/core/src/main/scala/chisel3/experimental/hierarchy/Hierarchy.scala @@ -36,7 +36,8 @@ sealed trait Hierarchy[+A] { */ def isA[B : TypeTag]: Boolean = { val tptag = implicitly[TypeTag[B]] - val name = tptag.tpe.toString + // drop any type information for the comparison, because the proto will not have that information. + val name = tptag.tpe.toString.takeWhile(_ != '[') inBaseClasses(name) } -- cgit v1.2.3