// TODO (maxime) consider separating concerns between deprecation and access restriction.
// Caveat: this was not the case when access restriction funtion was added.
if (isExplicitUse && (method.modifiers & ExtraCompilerModifiers.AccRestrictedAccess) != 0) {
// note: explicit constructors calls warnings are kept despite the 'new C1()' case (two
// warnings, one on type, the other on constructor), because of the 'super()' case.
AccessRestriction restriction =
scope.environment().getAccessRestriction(method.declaringClass.erasure());
if (restriction != null) {
scope.problemReporter().forbiddenReference(method, this,
restriction.classpathEntryType, restriction.classpathEntryName,
restriction.getProblemId());
}
}
if (!method.isViewedAsDeprecated()) return false;