mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-07 22:09:38 +07:00
[uast] EA-794591: do not resolve PsiClassType in withReceiver if it is invalid
GitOrigin-RevId: 2ae29f5e5dda84f39d0b3a209dbf604fc2c8d935
This commit is contained in:
committed by
intellij-monorepo-bot
parent
4f162b3cb2
commit
27dc3f1e42
@@ -126,7 +126,7 @@ private fun isPropertyAssignCall(argument: UElement, methodPattern: ElementPatte
|
||||
class UCallExpressionPattern : UElementPattern<UCallExpression, UCallExpressionPattern>(UCallExpression::class.java) {
|
||||
|
||||
fun withReceiver(classPattern: ElementPattern<PsiClass>): UCallExpressionPattern =
|
||||
filterWithContext { it, context -> (it.receiverType as? PsiClassType)?.resolve()?.let { classPattern.accepts(it, context) } ?: false }
|
||||
filterWithContext { it, context -> (it.receiverType as? PsiClassType)?.takeIf { it.isValid }?.resolve()?.let { classPattern.accepts(it, context) } ?: false }
|
||||
|
||||
fun withMethodName(methodName: String): UCallExpressionPattern = withMethodNames(listOf(methodName))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user