diff options
author | Simon Ochsenreither <simon@ochsenreither.de> | 2016-04-02 13:38:15 +0200 |
---|---|---|
committer | Simon Ochsenreither <simon@ochsenreither.de> | 2016-05-28 21:42:40 +0200 |
commit | 673350e08af72454fe9df87ae7f3292893e44d3c (patch) | |
tree | 7bff97a5ba4dafd0836f529589e8572175a442e7 /src/reflect | |
parent | 981e3c51d5040ea808b5f699718db55241ee42cf (diff) | |
download | scala-673350e08af72454fe9df87ae7f3292893e44d3c.tar.gz scala-673350e08af72454fe9df87ae7f3292893e44d3c.tar.bz2 scala-673350e08af72454fe9df87ae7f3292893e44d3c.zip |
SI-9084 Add `since` (if available) to deprecation warnings
Diffstat (limited to 'src/reflect')
-rw-r--r-- | src/reflect/scala/reflect/internal/Symbols.scala | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/src/reflect/scala/reflect/internal/Symbols.scala b/src/reflect/scala/reflect/internal/Symbols.scala index ed51414382..8f24b435b3 100644 --- a/src/reflect/scala/reflect/internal/Symbols.scala +++ b/src/reflect/scala/reflect/internal/Symbols.scala @@ -871,21 +871,26 @@ trait Symbols extends api.Symbols { self: SymbolTable => ) } - def isStrictFP = hasAnnotation(ScalaStrictFPAttr) || (enclClass hasAnnotation ScalaStrictFPAttr) - def isSerializable = info.baseClasses.exists(p => p == SerializableClass || p == JavaSerializableClass) - def hasBridgeAnnotation = hasAnnotation(BridgeClass) - def isDeprecated = hasAnnotation(DeprecatedAttr) - def deprecationMessage = getAnnotation(DeprecatedAttr) flatMap (_ stringArg 0) - def deprecationVersion = getAnnotation(DeprecatedAttr) flatMap (_ stringArg 1) - def deprecatedParamName = getAnnotation(DeprecatedNameAttr) flatMap (_ symbolArg 0 orElse Some(nme.NO_NAME)) + def isStrictFP = hasAnnotation(ScalaStrictFPAttr) || (enclClass hasAnnotation ScalaStrictFPAttr) + def isSerializable = info.baseClasses.exists(p => p == SerializableClass || p == JavaSerializableClass) + def hasBridgeAnnotation = hasAnnotation(BridgeClass) + def isDeprecated = hasAnnotation(DeprecatedAttr) + def deprecationMessage = getAnnotation(DeprecatedAttr) flatMap (_ stringArg 0) + def deprecationVersion = getAnnotation(DeprecatedAttr) flatMap (_ stringArg 1) + def deprecatedParamName = getAnnotation(DeprecatedNameAttr) flatMap (_ symbolArg 0 orElse Some(nme.NO_NAME)) + def deprecatedParamVersion = getAnnotation(DeprecatedNameAttr) flatMap (_ stringArg 1) def hasDeprecatedInheritanceAnnotation - = hasAnnotation(DeprecatedInheritanceAttr) + = hasAnnotation(DeprecatedInheritanceAttr) def deprecatedInheritanceMessage - = getAnnotation(DeprecatedInheritanceAttr) flatMap (_ stringArg 0) + = getAnnotation(DeprecatedInheritanceAttr) flatMap (_ stringArg 0) + def deprecatedInheritanceVersion + = getAnnotation(DeprecatedInheritanceAttr) flatMap (_ stringArg 1) def hasDeprecatedOverridingAnnotation - = hasAnnotation(DeprecatedOverridingAttr) + = hasAnnotation(DeprecatedOverridingAttr) def deprecatedOverridingMessage - = getAnnotation(DeprecatedOverridingAttr) flatMap (_ stringArg 0) + = getAnnotation(DeprecatedOverridingAttr) flatMap (_ stringArg 0) + def deprecatedOverridingVersion + = getAnnotation(DeprecatedOverridingAttr) flatMap (_ stringArg 1) // !!! when annotation arguments are not literal strings, but any sort of // assembly of strings, there is a fair chance they will turn up here not as |