Get argument name from stubs if possible (KT-23738)

This commit is contained in:
Nikolay Krasko
2018-11-02 15:33:20 +03:00
parent 3f53f9d9fb
commit 359e16eb82
@@ -22,7 +22,6 @@ import com.intellij.psi.impl.source.tree.LeafPsiElement;
import com.intellij.psi.tree.TokenSet;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.kotlin.KtNodeTypes;
import org.jetbrains.kotlin.lexer.KtTokens;
import org.jetbrains.kotlin.psi.stubs.KotlinPlaceHolderStub;
import org.jetbrains.kotlin.psi.stubs.elements.KtPlaceHolderStubElementType;
@@ -76,7 +75,7 @@ public class KtValueArgument extends KtElementImplStub<KotlinPlaceHolderStub<? e
@Override
@Nullable
public KtValueArgumentName getArgumentName() {
return (KtValueArgumentName) findChildByType(KtNodeTypes.VALUE_ARGUMENT_NAME);
return getStubOrPsiChild(KtStubElementTypes.VALUE_ARGUMENT_NAME);
}
@Nullable