File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
compiler/src/dotty/tools/dotc/typer Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -902,7 +902,7 @@ object RefChecks {
902
902
903
903
def isDeprecatedOrEnum (owner : Symbol )(using Context ) =
904
904
// pre: sym is an enumcase
905
- owner.isDeprecated
905
+ isDeprecatedOrSyntheticMethod( owner)
906
906
|| isEnumOwner(owner)
907
907
908
908
def isDeprecatedOrSyntheticMethod (owner : Symbol ) = owner.isDeprecated || (owner.isRealMethod && owner.is(Synthetic ))
@@ -916,8 +916,7 @@ object RefChecks {
916
916
* module that declares `sym`.
917
917
*/
918
918
def skipWarning (using Context ) =
919
- if sym.isEnum then ctx.owner.ownersIterator.exists(isDeprecatedOrEnum)
920
- else ctx.owner.ownersIterator.exists(isDeprecatedOrSyntheticMethod)
919
+ ctx.owner.ownersIterator.exists(if sym.isEnumCase then isDeprecatedOrEnum else isDeprecatedOrSyntheticMethod)
921
920
922
921
for annot <- sym.getAnnotation(defn.DeprecatedAnnot ) do
923
922
if ! skipWarning then
You can’t perform that action at this time.
0 commit comments