Type projection is not a declaration
This commit is contained in:
@@ -18,7 +18,6 @@ package org.jetbrains.jet.lang.psi;
|
|||||||
|
|
||||||
import com.intellij.lang.ASTNode;
|
import com.intellij.lang.ASTNode;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
|
||||||
import org.jetbrains.jet.JetNodeTypes;
|
import org.jetbrains.jet.JetNodeTypes;
|
||||||
import org.jetbrains.jet.lexer.JetToken;
|
import org.jetbrains.jet.lexer.JetToken;
|
||||||
|
|
||||||
@@ -30,13 +29,14 @@ public abstract class JetDeclaration extends JetExpression implements JetModifie
|
|||||||
super(node);
|
super(node);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nullable
|
@Override
|
||||||
public JetModifierList getModifierList() {
|
public JetModifierList getModifierList() {
|
||||||
return (JetModifierList) findChildByType(JetNodeTypes.MODIFIER_LIST);
|
return (JetModifierList) findChildByType(JetNodeTypes.MODIFIER_LIST);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean hasModifier(JetToken modifier) {
|
public boolean hasModifier(JetToken modifier) {
|
||||||
JetModifierList modifierList = getModifierList();
|
JetModifierList modifierList = getModifierList();
|
||||||
return modifierList == null ? false : modifierList.hasModifier(modifier);
|
return modifierList != null && modifierList.hasModifier(modifier);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,16 +21,28 @@ import com.intellij.psi.PsiElement;
|
|||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
import org.jetbrains.jet.JetNodeTypes;
|
import org.jetbrains.jet.JetNodeTypes;
|
||||||
|
import org.jetbrains.jet.lexer.JetToken;
|
||||||
import org.jetbrains.jet.lexer.JetTokens;
|
import org.jetbrains.jet.lexer.JetTokens;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author abreslav
|
* @author abreslav
|
||||||
*/
|
*/
|
||||||
public class JetTypeProjection extends JetDeclaration {
|
public class JetTypeProjection extends JetElement implements JetModifierListOwner {
|
||||||
public JetTypeProjection(@NotNull ASTNode node) {
|
public JetTypeProjection(@NotNull ASTNode node) {
|
||||||
super(node);
|
super(node);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public JetModifierList getModifierList() {
|
||||||
|
return (JetModifierList) findChildByType(JetNodeTypes.MODIFIER_LIST);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean hasModifier(JetToken modifier) {
|
||||||
|
JetModifierList modifierList = getModifierList();
|
||||||
|
return modifierList != null && modifierList.hasModifier(modifier);
|
||||||
|
}
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
public JetProjectionKind getProjectionKind() {
|
public JetProjectionKind getProjectionKind() {
|
||||||
ASTNode projectionNode = getProjectionNode();
|
ASTNode projectionNode = getProjectionNode();
|
||||||
|
|||||||
Reference in New Issue
Block a user