From 35f1415ad6df07df199951a89816645748e0deed Mon Sep 17 00:00:00 2001 From: Oscar Boykin Date: Tue, 10 Dec 2024 13:10:43 -1000 Subject: [PATCH] Fix tree shaking graph edge code --- core/src/main/scala/org/bykn/bosatsu/PackageMap.scala | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/src/main/scala/org/bykn/bosatsu/PackageMap.scala b/core/src/main/scala/org/bykn/bosatsu/PackageMap.scala index f667a6616..d5d572073 100644 --- a/core/src/main/scala/org/bykn/bosatsu/PackageMap.scala +++ b/core/src/main/scala/org/bykn/bosatsu/PackageMap.scala @@ -126,7 +126,10 @@ object PackageMap { def dependency(a: Ident): Iterable[Ident] = p.toMap.get(a._1) match { case Some(pack) => - pack.lets.flatMap { case (_, _, te) => te.globals } + pack.lets.flatMap { + case (n, _, te) if a._2 === n => te.globals + case _ => Nil + } case None => Nil }