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
|
* annotated with `@X` where [annotationFqName] is the FQ name of X
|
||||||
*/
|
*/
|
||||||
fun PsiElement.isOptInAllowed(
|
fun PsiElement.isOptInAllowed(
|
||||||
|
annotationFqName: FqName,
|
||||||
|
languageVersionSettings: LanguageVersionSettings,
|
||||||
|
bindingContext: BindingContext
|
||||||
|
): Boolean = isOptInAllowed(annotationFqName, languageVersionSettings, bindingContext, subclassesOnly = false)
|
||||||
|
|
||||||
|
private fun PsiElement.isOptInAllowed(
|
||||||
annotationFqName: FqName,
|
annotationFqName: FqName,
|
||||||
languageVersionSettings: LanguageVersionSettings,
|
languageVersionSettings: LanguageVersionSettings,
|
||||||
bindingContext: BindingContext,
|
bindingContext: BindingContext,
|
||||||
|
|||||||
+1
-3
@@ -117,9 +117,7 @@ class DeprecationResolver(
|
|||||||
return if (callElement != null && bindingContext != null) {
|
return if (callElement != null && bindingContext != null) {
|
||||||
with(OptInUsageChecker) {
|
with(OptInUsageChecker) {
|
||||||
sinceKotlinAccessibility.markerClasses.any { classDescriptor ->
|
sinceKotlinAccessibility.markerClasses.any { classDescriptor ->
|
||||||
!callElement.isOptInAllowed(
|
!callElement.isOptInAllowed(classDescriptor.fqNameSafe, languageVersionSettings, bindingContext)
|
||||||
classDescriptor.fqNameSafe, languageVersionSettings, bindingContext, subclassesOnly = false
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user