Decide whether the deprecation of sym should be ignored in this context.
Decide whether the deprecation of sym should be ignored in this context.
The warning is skipped if any symbol in the context owner chain is deprecated, that is, an enclosing scope is associated with a deprecated symbol.
Further exclusions are needed for enums and case classes, since they typically need to refer to deprecated members even if the enclosing enum or case class is not deprecated.
If and only if sym is an enum case, the warning is skipped if an enclosing scope is either a module that declares sym, or the companion class of the module that declares sym.
For a deprecated case class or case class element, the warning is skipped for synthetic sites where the enclosing class (or its companion) is either the deprecated case class or the case class of the deprecated element.