From b04ea78a24632c44b675858da62fb97364f980ed Mon Sep 17 00:00:00 2001 From: NthPortal Date: Sat, 17 Oct 2020 09:24:13 -0400 Subject: [PATCH] Un-deprecate some shadowing inner classes in compiler --- src/compiler/scala/tools/nsc/ast/Trees.scala | 3 ++- src/compiler/scala/tools/nsc/transform/OverridingPairs.scala | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/compiler/scala/tools/nsc/ast/Trees.scala b/src/compiler/scala/tools/nsc/ast/Trees.scala index a2f18c8e2f4b..f41aff2bda39 100644 --- a/src/compiler/scala/tools/nsc/ast/Trees.scala +++ b/src/compiler/scala/tools/nsc/ast/Trees.scala @@ -173,8 +173,9 @@ trait Trees extends scala.reflect.internal.Trees { self: Global => @nowarn("""cat=deprecation&origin=scala\.tools\.nsc\.ast\.Trees\.Transformer""") final type AstTransformer = Transformer + // TODO: deprecate when we can cleanly cross-compile without warnings + // @deprecated("use AstTransformer instead", since = "2.13.4") @nowarn("msg=shadowing a nested class of a parent is deprecated") - @deprecated("use AstTransformer instead", since = "2.13.4") class Transformer extends InternalTransformer { def transformUnit(unit: CompilationUnit): Unit = { try unit.body = transform(unit.body) diff --git a/src/compiler/scala/tools/nsc/transform/OverridingPairs.scala b/src/compiler/scala/tools/nsc/transform/OverridingPairs.scala index 1db252ef5424..87a762a2c9c9 100644 --- a/src/compiler/scala/tools/nsc/transform/OverridingPairs.scala +++ b/src/compiler/scala/tools/nsc/transform/OverridingPairs.scala @@ -28,8 +28,9 @@ abstract class OverridingPairs extends SymbolPairs { @nowarn("""cat=deprecation&origin=scala\.tools\.nsc\.transform\.OverridingPairs\.Cursor""") final type PairsCursor = Cursor + // TODO: deprecate when we can cleanly cross-compile without warnings + // @deprecated("use PairsCursor instead", since = "2.13.4") @nowarn("msg=shadowing a nested class of a parent is deprecated") - @deprecated("use PairsCursor instead", since = "2.13.4") class Cursor(base: Symbol) extends super.Cursor(base) { /** Symbols to exclude: Here these are constructors and private/artifact symbols, * including bridges. But it may be refined in subclasses.