Skip to content

Commit cfbe8b4

Browse files
committed
Also deprecate backing field symbols.
Compiling @deprecated val foo: T = some.deprecated(call) yielded private[this] val `foo `: T = some.deprecated(call) @deprecated <accessor> def foo: T = this.`foo ` where the `@deprecated` has been slapped on the def (where it'll incur deprecation warnings on callers) but not on the val (where it'll suppress deprecation warnings on the body. Just copy the annotation across. Fixes scala/bug#11538 in an expedient manner.
1 parent bcf954f commit cfbe8b4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/src/scala/deprecated.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,5 +64,5 @@ import scala.annotation.meta._
6464
* @see [[scala.deprecatedOverriding]]
6565
* @see [[scala.deprecatedName]]
6666
*/
67-
@getter @setter @beanGetter @beanSetter
67+
@getter @setter @beanGetter @beanSetter @field
6868
class deprecated(message: String = "", since: String = "") extends scala.annotation.StaticAnnotation

0 commit comments

Comments
 (0)