[FE 1.0] Add fallback for extracting when call

This commit is contained in:
Victor Petukhov
2022-06-21 11:24:33 +02:00
committed by teamcity
parent 42e71f8c53
commit db54d18c72
8 changed files with 78 additions and 1 deletions
@@ -160,7 +160,7 @@ fun KtElement.getCall(context: BindingContext): Call? {
if (element is KtWhenExpression) {
val subjectVariable = element.subjectVariable
if (subjectVariable != null) {
return subjectVariable.getCall(context)
return subjectVariable.getCall(context) ?: context[CALL, element]
}
}