Using Scala version 2.8.0.r19995-b20091203110322 (Java !HotSpot(TM) Server VM, Java 1.6.0_17).
Given A.scala, B.scala
object A {
val x = 3
}
object B {
val y = A.x
}
Compile with:
scalac -make:transitive *.scala
Remove A.scala
Recompile with:
scalac -make:transitive *.scala
Output is:
Recompiling 1 files
error: error while loading A, ./A.class (No such file or directory)
one error found
Either compiling without -make:transitive or doing a second compile, the output is:
B.scala:3: error: not found: value A
val y = A.x
^
one error found