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
scalac simply treats Java annotations differently than Scala annotations. If we can't extract the information we have to fix it in the compiler, which we don't want to do. Test cases (for ScalacConverterTest):
@Testdefjava_annotation_with_argument_of_name_value() = {
convert(
"x.scala"→""" @Ann(Constants.C) class X object Constants { final val C = 0 }""",
"Ann.java"→""" public @interface Ann { int value(); } class XXX { void xxx() { int i = 0; System.out.println(i); } }""") ===Set(
"X", "Constants", "Constants.C", "<ref>Ann", "<ref>Constants", "Constants.<ref>C")
}
@Testdefjava_annotation_with_argument() = {
convert(
"x.scala"→""" @Ann(v1 = Constants.C) class X object Constants { final val C = 0 }""",
"Ann.java"→""" public @interface Ann { int v1(); }""") ===Set(
"X", "Constants", "Constants.C", "<ref>Ann", "<ref>Constants", "Constants.<ref>C", "Ann.<ref>v1")
}
The text was updated successfully, but these errors were encountered:
scalac simply treats Java annotations differently than Scala annotations. If we can't extract the information we have to fix it in the compiler, which we don't want to do. Test cases (for
ScalacConverterTest
):The text was updated successfully, but these errors were encountered: