OptInUsageChecker: restore public API isOptInAllowed method
This commit is contained in:
committed by
teamcity
parent
81e1131441
commit
cb1123cccd
@@ -324,6 +324,12 @@ class OptInUsageChecker(project: Project) : CallChecker {
|
||||
* annotated with `@X` where [annotationFqName] is the FQ name of X
|
||||
*/
|
||||
fun PsiElement.isOptInAllowed(
|
||||
annotationFqName: FqName,
|
||||
languageVersionSettings: LanguageVersionSettings,
|
||||
bindingContext: BindingContext
|
||||
): Boolean = isOptInAllowed(annotationFqName, languageVersionSettings, bindingContext, subclassesOnly = false)
|
||||
|
||||
private fun PsiElement.isOptInAllowed(
|
||||
annotationFqName: FqName,
|
||||
languageVersionSettings: LanguageVersionSettings,
|
||||
bindingContext: BindingContext,
|
||||
|
||||
+1
-3
@@ -117,9 +117,7 @@ class DeprecationResolver(
|
||||
return if (callElement != null && bindingContext != null) {
|
||||
with(OptInUsageChecker) {
|
||||
sinceKotlinAccessibility.markerClasses.any { classDescriptor ->
|
||||
!callElement.isOptInAllowed(
|
||||
classDescriptor.fqNameSafe, languageVersionSettings, bindingContext, subclassesOnly = false
|
||||
)
|
||||
!callElement.isOptInAllowed(classDescriptor.fqNameSafe, languageVersionSettings, bindingContext)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user