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 }