Skip to content

Commit

Permalink
make more annotations extend ConstantAnnotation
Browse files Browse the repository at this point in the history
now that it's possible to do so, after #9463
  • Loading branch information
SethTisue committed Mar 16, 2021
1 parent 1d5a873 commit ae80aa9
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/library/scala/annotation/elidable.scala
Expand Up @@ -76,7 +76,7 @@ package scala.annotation
* }
* }}}
*/
final class elidable(final val level: Int) extends scala.annotation.StaticAnnotation
final class elidable(final val level: Int) extends scala.annotation.ConstantAnnotation

/** This useless appearing code was necessary to allow people to use
* named constants for the elidable annotation. This is what it takes
Expand Down
2 changes: 1 addition & 1 deletion src/library/scala/annotation/migration.scala
Expand Up @@ -27,4 +27,4 @@ package scala.annotation
* @param changedIn The version, in which the behaviour change was
* introduced.
*/
private[scala] final class migration(message: String, changedIn: String) extends scala.annotation.StaticAnnotation
private[scala] final class migration(message: String, changedIn: String) extends scala.annotation.ConstantAnnotation
2 changes: 1 addition & 1 deletion src/library/scala/deprecated.scala
Expand Up @@ -58,4 +58,4 @@ import scala.annotation.meta._
*/
@getter @setter @beanGetter @beanSetter @field
@deprecatedInheritance("Scheduled for being final in the future", "2.13.0")
class deprecated(message: String = "", since: String = "") extends scala.annotation.StaticAnnotation
class deprecated(message: String = "", since: String = "") extends scala.annotation.ConstantAnnotation
2 changes: 1 addition & 1 deletion src/library/scala/deprecatedInheritance.scala
Expand Up @@ -47,4 +47,4 @@ import scala.annotation.meta._
* @see [[scala.deprecatedName]]
*/
@getter @setter @beanGetter @beanSetter
final class deprecatedInheritance(message: String = "", since: String = "") extends scala.annotation.StaticAnnotation
final class deprecatedInheritance(message: String = "", since: String = "") extends scala.annotation.ConstantAnnotation
3 changes: 2 additions & 1 deletion src/library/scala/deprecatedName.scala
Expand Up @@ -14,7 +14,6 @@ package scala

import scala.annotation.meta._


/** An annotation that designates that the name of a parameter is deprecated.
*
* Using this name in a named argument generates a deprecation warning.
Expand Down Expand Up @@ -43,6 +42,8 @@ import scala.annotation.meta._
@param
@deprecatedInheritance("Scheduled for being final in the future", "2.13.0")
class deprecatedName(name: String = "<none>", since: String = "") extends scala.annotation.StaticAnnotation {
// at the time we remove these constructors, we should also change this from a StaticAnnotation to
// a ConstantAnnotation; for now, the presence of auxiliary constructors blocks that change
@deprecated("The parameter name should be a String, not a symbol.", "2.13.0") def this(name: Symbol, since: String) = this(name.name, since)
@deprecated("The parameter name should be a String, not a symbol.", "2.13.0") def this(name: Symbol) = this(name.name, "")
}
2 changes: 1 addition & 1 deletion src/library/scala/deprecatedOverriding.scala
Expand Up @@ -49,4 +49,4 @@ import scala.annotation.meta._
*/
@getter @setter @beanGetter @beanSetter
@deprecatedInheritance("Scheduled for being final in the future", "2.13.0")
class deprecatedOverriding(message: String = "", since: String = "") extends scala.annotation.StaticAnnotation
class deprecatedOverriding(message: String = "", since: String = "") extends scala.annotation.ConstantAnnotation

0 comments on commit ae80aa9

Please sign in to comment.