From 3b299397dbe3a7bade18b96272796f8a8aeb2971 Mon Sep 17 00:00:00 2001 From: "Wesley W. Terpstra" Date: Mon, 20 Nov 2017 17:21:10 -0800 Subject: [PATCH] diplomacy: bind resources to outer-most binding This is probably the wrong thing to do, but it is expedient for now. We need a better way to do cross-coreplex visibility. --- src/main/scala/diplomacy/Resources.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/scala/diplomacy/Resources.scala b/src/main/scala/diplomacy/Resources.scala index 262190ac..8c22c5e3 100644 --- a/src/main/scala/diplomacy/Resources.scala +++ b/src/main/scala/diplomacy/Resources.scala @@ -269,7 +269,7 @@ object BindingScope { protected[diplomacy] var active: Option[BindingScope] = None protected[diplomacy] def find(m: Option[LazyModule] = LazyModule.scope): Option[BindingScope] = m.flatMap { - case s: BindingScope => Some(s) + case x: BindingScope => find(x.parent).orElse(Some(x)) case x => find(x.parent) } }