summaryrefslogtreecommitdiff
path: root/core/src
diff options
context:
space:
mode:
authorMegan Wachs2022-01-07 15:28:56 -0800
committerGitHub2022-01-07 23:28:56 +0000
commita1af6b7099f1207c67db3561507615fd18c487ef (patch)
tree86083634d8b7a67ff0a249768692164737f35de3 /core/src
parent72d5be9634c677e47ec8fce204be55c8936166fb (diff)
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
Diffstat (limited to 'core/src')
-rw-r--r--core/src/main/scala/chisel3/experimental/hierarchy/Hierarchy.scala3
1 files changed, 2 insertions, 1 deletions
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)
}