diff options
Diffstat (limited to 'src/main/scala/hbt/Evaluator.scala')
-rw-r--r-- | src/main/scala/hbt/Evaluator.scala | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main/scala/hbt/Evaluator.scala b/src/main/scala/hbt/Evaluator.scala index 442ec633..2931662a 100644 --- a/src/main/scala/hbt/Evaluator.scala +++ b/src/main/scala/hbt/Evaluator.scala @@ -17,9 +17,10 @@ object Evaluator{ def rec(t: Target[_], path: List[String]): Unit = { if (targetPaths.contains(t)) () // do nothing else { - val currentPath = - if (!t.label.startsWith(enclosing.value)) path.reverse - else t.label.stripPrefix(enclosing.value).drop(1).split('.').toList + val currentPath = t.defCtx.staticEnclosing match{ + case None => path.reverse + case Some(s) => s.stripPrefix(enclosing.value).drop(1).split('.').toList + } targetPaths(t) = currentPath t.inputs.zipWithIndex.foreach{case (c, i) => rec(c, i.toString :: currentPath)} |