From d5a964f6e7beea1f38f9623224fc65e2397e1fe7 Mon Sep 17 00:00:00 2001 From: mergify[bot] Date: Tue, 26 Apr 2022 00:49:16 +0000 Subject: Fix spurious warning from Bundle plugin (#2506) (#2507) For traits or abstract classes that extend Bundle but have no concrete methods, the plugin will print a benign warning that the user cannot fix. It will no longer print that warning. (cherry picked from commit ed4a98188ee1fe43efbd3a1ba43a657a128764d6) Co-authored-by: Jack Koenig --- plugin/src/main/scala/chisel3/internal/plugin/BundleComponent.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugin/src') diff --git a/plugin/src/main/scala/chisel3/internal/plugin/BundleComponent.scala b/plugin/src/main/scala/chisel3/internal/plugin/BundleComponent.scala index d768175d..e3ec0a04 100644 --- a/plugin/src/main/scala/chisel3/internal/plugin/BundleComponent.scala +++ b/plugin/src/main/scala/chisel3/internal/plugin/BundleComponent.scala @@ -111,7 +111,7 @@ private[plugin] class BundleComponent(val global: Global, arguments: ChiselPlugi override def transform(tree: Tree): Tree = tree match { - case bundle: ClassDef if isBundle(bundle.symbol) => + case bundle: ClassDef if isBundle(bundle.symbol) && !bundle.mods.hasFlag(Flag.ABSTRACT) => // ==================== Generate _cloneTypeImpl ==================== val (con, params) = getConstructorAndParams(bundle.impl.body) if (con.isEmpty) { -- cgit v1.2.3