scala / bug

Scala 2 bug reports only. Please, no questions — proper bug reports only.
https://scala-lang.org
232 stars 21 forks source link

Deprecation issued in Java source #13017

Closed lrytz closed 4 months ago

lrytz commented 4 months ago

The Scala compiler should not emit warnings in Java sources.

public enum En {
  @Deprecated Um
}

public @interface Ann {
  En value();
}

public class A {
  @Ann(En.Um)
  public static void te() { return; }
}

gives

$> sc Test.java -Ypickle-java -deprecation
/Users/luc/code/scala/scala13/sandbox/Test.java:10: warning: Java enum Um in Java enum En is deprecated
  @Ann(En.Um)
          ^
1 warning
SethTisue commented 4 months ago

unintended consequence of https://github.com/scala/scala/pull/10517 , perhaps?