Callable references handled
This commit is contained in:
+13
@@ -314,6 +314,19 @@ private class Processor(
|
||||
return true // companion object member or static member access - ignore it
|
||||
}
|
||||
}
|
||||
|
||||
is KtCallableReferenceExpression -> {
|
||||
when (element) {
|
||||
parent.receiverExpression -> { // usage in receiver of callable reference (before "::") - ignore it
|
||||
return true
|
||||
}
|
||||
|
||||
parent.callableReference -> { // usage after "::" in callable reference - should be reference to constructor of our data class
|
||||
processSuspiciousExpression(element)
|
||||
return true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (element.getStrictParentOfType<KtImportDirective>() != null) return true // ignore usage in import
|
||||
|
||||
Reference in New Issue
Block a user