File tree Expand file tree Collapse file tree 6 files changed +4
-10
lines changed
compiler/scala/tools/nsc/typechecker Expand file tree Collapse file tree 6 files changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -58,7 +58,6 @@ trait Infer extends Checkable {
58
58
def improves (sym1 : Symbol , sym2 : Symbol ) = (
59
59
(sym2 eq NoSymbol )
60
60
|| sym2.isError
61
- || (sym2 hasAnnotation BridgeClass )
62
61
|| isBetter(sym1, sym2)
63
62
)
64
63
Original file line number Diff line number Diff line change @@ -550,7 +550,7 @@ abstract class RefChecks extends Transform {
550
550
}
551
551
552
552
def checkOverrideDeprecated () {
553
- if (other.hasDeprecatedOverridingAnnotation && ! (member.hasDeprecatedOverridingAnnotation || member.ownerChain.exists(x => x .isDeprecated || x.hasBridgeAnnotation ))) {
553
+ if (other.hasDeprecatedOverridingAnnotation && ! (member.hasDeprecatedOverridingAnnotation || member.ownerChain.exists(_ .isDeprecated))) {
554
554
val version = other.deprecatedOverridingVersion.getOrElse(" " )
555
555
val since = if (version.isEmpty) version else s " (since $version) "
556
556
val message = other.deprecatedOverridingMessage map (msg => s " : $msg" ) getOrElse " "
@@ -1235,8 +1235,7 @@ abstract class RefChecks extends Transform {
1235
1235
private def checkUndesiredProperties (sym : Symbol , pos : Position ) {
1236
1236
// If symbol is deprecated, and the point of reference is not enclosed
1237
1237
// in either a deprecated member or a scala bridge method, issue a warning.
1238
- // TODO: x.hasBridgeAnnotation doesn't seem to be needed here...
1239
- if (sym.isDeprecated && ! currentOwner.ownerChain.exists(x => x.isDeprecated || x.hasBridgeAnnotation))
1238
+ if (sym.isDeprecated && ! currentOwner.ownerChain.exists(x => x.isDeprecated))
1240
1239
currentRun.reporting.deprecationWarning(pos, sym)
1241
1240
1242
1241
// Similar to deprecation: check if the symbol is marked with @migration
Original file line number Diff line number Diff line change @@ -1751,7 +1751,7 @@ trait Typers extends Adaptations with Tags with TypersTracking with PatternTyper
1751
1751
val sameSourceFile = context.unit.source.file == psym.sourceFile
1752
1752
1753
1753
if (! isPastTyper && psym.hasDeprecatedInheritanceAnnotation &&
1754
- ! sameSourceFile && ! context.owner.ownerChain.exists(x => x .isDeprecated || x.hasBridgeAnnotation )) {
1754
+ ! sameSourceFile && ! context.owner.ownerChain.exists(_ .isDeprecated)) {
1755
1755
val version = psym.deprecatedInheritanceVersion.getOrElse(" " )
1756
1756
val since = if (version.isEmpty) version else s " (since $version) "
1757
1757
val message = psym.deprecatedInheritanceMessage.map(msg => s " : $msg" ).getOrElse(" " )
@@ -3147,8 +3147,7 @@ trait Typers extends Adaptations with Tags with TypersTracking with PatternTyper
3147
3147
&& (inBlock || ! (sym.isMethod || sym1.isMethod) || (sym.tpe matches sym1.tpe))
3148
3148
// default getters are defined twice when multiple overloads have defaults.
3149
3149
// The error for this is deferred until RefChecks.checkDefaultsInOverloaded
3150
- && (! sym.isErroneous && ! sym1.isErroneous && ! sym.hasDefault &&
3151
- ! sym.hasAnnotation(BridgeClass ) && ! sym1.hasAnnotation(BridgeClass ))) {
3150
+ && ! sym.isErroneous && ! sym1.isErroneous && ! sym.hasDefault) {
3152
3151
log(" Double definition detected:\n " +
3153
3152
((sym.getClass, sym.info, sym.ownerChain)) + " \n " +
3154
3153
((sym1.getClass, sym1.info, sym1.ownerChain)))
Original file line number Diff line number Diff line change @@ -1119,7 +1119,6 @@ trait Definitions extends api.StandardDefinitions {
1119
1119
lazy val AnnotationRetentionPolicyAttr = requiredClass[java.lang.annotation.RetentionPolicy ]
1120
1120
1121
1121
// Annotations
1122
- lazy val BridgeClass = requiredClass[scala.annotation.bridge]
1123
1122
lazy val ElidableMethodClass = requiredClass[scala.annotation.elidable]
1124
1123
lazy val ImplicitNotFoundClass = requiredClass[scala.annotation.implicitNotFound]
1125
1124
lazy val ImplicitAmbiguousClass = getClassIfDefined(" scala.annotation.implicitAmbiguous" )
Original file line number Diff line number Diff line change @@ -900,7 +900,6 @@ trait Symbols extends api.Symbols { self: SymbolTable =>
900
900
901
901
def isStrictFP = hasAnnotation(ScalaStrictFPAttr ) || (enclClass hasAnnotation ScalaStrictFPAttr )
902
902
def isSerializable = info.baseClasses.exists(p => p == SerializableClass || p == JavaSerializableClass )
903
- def hasBridgeAnnotation = hasAnnotation(BridgeClass )
904
903
def isDeprecated = hasAnnotation(DeprecatedAttr )
905
904
def deprecationMessage = getAnnotation(DeprecatedAttr ) flatMap (_ stringArg 0 )
906
905
def deprecationVersion = getAnnotation(DeprecatedAttr ) flatMap (_ stringArg 1 )
Original file line number Diff line number Diff line change @@ -378,7 +378,6 @@ trait JavaUniverseForce { self: runtime.JavaUniverse =>
378
378
definitions.StaticAnnotationClass
379
379
definitions.AnnotationRetentionAttr
380
380
definitions.AnnotationRetentionPolicyAttr
381
- definitions.BridgeClass
382
381
definitions.ElidableMethodClass
383
382
definitions.ImplicitNotFoundClass
384
383
definitions.ImplicitAmbiguousClass
You can’t perform that action at this time.
0 commit comments