From f6f5606f8e15fdc6872ea3723176a5ddf53cdd91 Mon Sep 17 00:00:00 2001 From: "Wesley W. Terpstra" Date: Thu, 18 Jan 2018 14:57:47 -0800 Subject: [PATCH] diplomacy: run user instantiate() method after nodes are initialized (#1198) --- src/main/scala/diplomacy/LazyModule.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/scala/diplomacy/LazyModule.scala b/src/main/scala/diplomacy/LazyModule.scala index bafcb56c..e7468ecf 100644 --- a/src/main/scala/diplomacy/LazyModule.scala +++ b/src/main/scala/diplomacy/LazyModule.scala @@ -174,7 +174,6 @@ sealed trait LazyModuleImpLike extends BaseModule mod.finishInstantiate() mod.dangles } - wrapper.instantiate() val nodeDangles = wrapper.nodes.reverse.flatMap(_.instantiate()) val allDangles = nodeDangles ++ childDangles val pairing = SortedMap(allDangles.groupBy(_.source).toSeq:_*) @@ -189,6 +188,7 @@ sealed trait LazyModuleImpLike extends BaseModule if (d.flipped) { d.data <> io } else { io <> d.data } d.copy(data = io, name = wrapper.valName.getOrElse("anon") + "_" + d.name) } + wrapper.instantiate() (auto, dangles) }