Skip to content

Commit 735ba03

Browse files
authored
Merge pull request scala/scala#10517 from kapunga/12845-use-java-deprecation
Always respect java.lang.Deprecated annotation
2 parents 70f063d + fac9625 commit 735ba03

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

library/src/scala/deprecated.scala

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ import scala.annotation.meta._
4040
* // warning: there were three deprecation warnings in total; re-run with -deprecation for details
4141
* }}}
4242
*
43+
* The Scala compiler also warns about using definitions annotated with [[java.lang.Deprecated]]. However it is
44+
* recommended to use the Scala `@deprecated` annotation in Scala code because it allows providing a deprecation message.
45+
*
4346
* '''`@deprecated` in the Scala language and its standard library'''<br/>
4447
*
4548
* A deprecated element of the Scala language or a definition in the Scala standard library will

0 commit comments

Comments
 (0)