Skip to content

Commit 7b9505f

Browse files
committed
Update for review
1 parent 703019f commit 7b9505f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

compiler/src/dotty/tools/dotc/typer/RefChecks.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -916,8 +916,7 @@ object RefChecks {
916916
* module that declares `sym`.
917917
*/
918918
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)
921920

922921
for annot <- sym.getAnnotation(defn.DeprecatedAnnot) do
923922
if !skipWarning then

0 commit comments

Comments
 (0)