Analyze Data Flow: Support properties with custom accessors

#KT-11994 In Progress
This commit is contained in:
Alexey Sedunov
2017-05-30 19:40:14 +03:00
parent d61ddaccb6
commit ea7d535ae7
25 changed files with 267 additions and 32 deletions
@@ -183,7 +183,7 @@ public class KtParameter extends KtNamedDeclarationStub<KotlinParameterStub> imp
}
@Nullable
public KtFunction getOwnerFunction() {
public KtDeclarationWithBody getOwnerFunction() {
PsiElement parent = getParentByStub();
if (!(parent instanceof KtParameterList)) return null;
return ((KtParameterList) parent).getOwnerFunction();
@@ -74,10 +74,10 @@ public class KtParameterList extends KtElementImplStub<KotlinPlaceHolderStub<KtP
removeParameter(getParameters().get(index));
}
public KtFunction getOwnerFunction() {
public KtDeclarationWithBody getOwnerFunction() {
PsiElement parent = getParentByStub();
if (!(parent instanceof KtFunction)) return null;
return (KtFunction) parent;
if (!(parent instanceof KtDeclarationWithBody)) return null;
return (KtDeclarationWithBody) parent;
}
@Nullable