-
Notifications
You must be signed in to change notification settings - Fork 21
Closed
Description
Aladdin: [http://scala-webapps.epfl.ch/bugtracking/contribs/display.do?id=768 contrib 768]
== Code ==
edit test.java:
class Foo {
public static void foo(int x) {}
}
compile test.java:
> javac test.java
edit test.scala:
object Bar {
Foo.foo(0)
}
compile test.scala with FSC:
> fsc -reset
> fsc -cp . test.scala
edit test.java:
class Foo {
public static void foo(String x) {}
}
compile test.java:
> javac test.java
edit test.scala:
object Bar {
Foo.foo("test")
}
compile test.scala with FSC:
> fsc -cp . test.scala== What happened ==
Last call to FSC results in:
test.scala:2: error: type mismatch;
found : java.lang.String("1")
required: Int
Foo.foo("1")
^
one error foundFSC is cacheing the first version of the java-compiled classfile. This bug can be quite difficult to track down if you're not expecting it!
== What expected ==
FSC should keep track of the last modification date of all external classfiles it reads in, and reload those with a more recent modification date than that stored.