You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
public classCls {
public static final int KONST=10;
}
and a Scala class
classT {
@Ann(Cls.KONST)
deffoo { }
}
Compiling the three files together with scalac yields an error message:
lucmac:const luc$ ~/Downloads/latest/bin/scalac Ann.java Cls.java T.scala
T.scala:2:error: annotation argument needs to be a constant; found: Cls.KONST@Ann(Cls.KONST)
^
one error found
Compiling first the java files and and putting their classfiles on the classpath allows compiling T.scala:
Given two java classes:
and a Scala class
Compiling the three files together with
scalac
yields an error message:Compiling first the java files and and putting their classfiles on the classpath allows compiling
T.scala
:The text was updated successfully, but these errors were encountered: