Use stub in JetParameter#getValOrValNode()

This commit is contained in:
Pavel V. Talanov
2014-03-27 20:51:35 +04:00
parent 420cae5307
commit b33e43c416
@@ -81,6 +81,10 @@ public class JetParameter extends JetNamedDeclarationStub<PsiJetParameterStub> {
@Nullable
public ASTNode getValOrVarNode() {
PsiJetParameterStub stub = getStub();
if (stub != null && !stub.hasValOrValNode()) {
return null;
}
ASTNode val = getNode().findChildByType(JetTokens.VAL_KEYWORD);
if (val != null) return val;