Can be private: correct detection of calls inside inline function
So #KT-22180 Fixed So #KT-22094 Fixed
This commit is contained in:
+1
-1
@@ -131,7 +131,7 @@ class MemberVisibilityCanBePrivateInspection : AbstractKotlinInspection() {
|
||||
return@Processor false
|
||||
}
|
||||
}
|
||||
val function = usage.getParentOfType<KtCallableDeclaration>(false)
|
||||
val function = usage.getParentOfType<KtNamedFunction>(true)
|
||||
val insideInlineFun = function?.modifierList?.let { it.hasModifier(KtTokens.INLINE_KEYWORD) && !function.isPrivate() } ?: false
|
||||
if (insideInlineFun) {
|
||||
otherUsageFound = true
|
||||
|
||||
Reference in New Issue
Block a user