We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 703019f commit 7b9505fCopy full SHA for 7b9505f
compiler/src/dotty/tools/dotc/typer/RefChecks.scala
@@ -916,8 +916,7 @@ object RefChecks {
916
* module that declares `sym`.
917
*/
918
def skipWarning(using Context) =
919
- if sym.isEnum then ctx.owner.ownersIterator.exists(isDeprecatedOrEnum)
920
- else ctx.owner.ownersIterator.exists(isDeprecatedOrSyntheticMethod)
+ ctx.owner.ownersIterator.exists(if sym.isEnumCase then isDeprecatedOrEnum else isDeprecatedOrSyntheticMethod)
921
922
for annot <- sym.getAnnotation(defn.DeprecatedAnnot) do
923
if !skipWarning then
0 commit comments