diff --git a/main/SessionSettings.scala b/main/SessionSettings.scala index ca5511a66..2a487c0d2 100755 --- a/main/SessionSettings.scala +++ b/main/SessionSettings.scala @@ -107,9 +107,8 @@ object SessionSettings val (_, oldShifted, replace, lineMap) = ((0, List[Setting[_]](), List[SessionSetting](), Map.empty[Int, (Int, List[String])]) /: inFile) { case ((offs, olds, repl, lineMap), s) => val RangePosition(_, r@LineRange(start, end)) = s.pos - def depends(s: Setting[_]) = !s.init.dependencies.isEmpty settings find (_._1.key == s.key) match { - case Some(ss@(ns, newLines)) if !depends(s) && !depends(ns) => + case Some(ss@(ns, newLines)) if !ns.init.dependencies.contains(ns.key) => val shifted = ns withPos RangePosition(path, LineRange(start - offs, start - offs + 1)) (offs + end - start - newLines.size, shifted::olds, ss::repl, lineMap + (start -> (end, newLines))) case _ => diff --git a/sbt/src/sbt-test/project/session-save/build.check.1 b/sbt/src/sbt-test/project/session-save/build.check.1 index 85beb3faa..1e25d0391 100755 --- a/sbt/src/sbt-test/project/session-save/build.check.1 +++ b/sbt/src/sbt-test/project/session-save/build.check.1 @@ -1,7 +1,4 @@ k1 := {error("k1")} -k2 := { -} - k2 <<= k1 map identity diff --git a/sbt/src/sbt-test/project/session-save/build.check.2 b/sbt/src/sbt-test/project/session-save/build.check.2 index d47b51846..42c414288 100755 --- a/sbt/src/sbt-test/project/session-save/build.check.2 +++ b/sbt/src/sbt-test/project/session-save/build.check.2 @@ -1,7 +1,4 @@ k1 := {} -k2 := { -} - k2 <<= k1 map identity diff --git a/sbt/src/sbt-test/project/session-save/build.check.3 b/sbt/src/sbt-test/project/session-save/build.check.3 new file mode 100755 index 000000000..ad18cca9f --- /dev/null +++ b/sbt/src/sbt-test/project/session-save/build.check.3 @@ -0,0 +1,6 @@ +k1 := {} + +k2 := {} + +k1 <<= k1 map {_ => error("k1")} +