diff --git a/compiler/frontend/src/org/jetbrains/jet/JetNodeTypes.java b/compiler/frontend/src/org/jetbrains/jet/JetNodeTypes.java index 0d8ad1f95c7..5df1c59b642 100644 --- a/compiler/frontend/src/org/jetbrains/jet/JetNodeTypes.java +++ b/compiler/frontend/src/org/jetbrains/jet/JetNodeTypes.java @@ -70,7 +70,7 @@ public interface JetNodeTypes { JetNodeType FUNCTION_TYPE = new JetNodeType("FUNCTION_TYPE", JetFunctionType.class); JetNodeType FUNCTION_TYPE_RECEIVER = new JetNodeType("FUNCTION_TYPE_RECEIVER", JetFunctionTypeReceiver.class); JetNodeType SELF_TYPE = new JetNodeType("SELF_TYPE", JetSelfType.class); - JetNodeType NULLABLE_TYPE = new JetNodeType("NULLABLE_TYPE", JetNullableType.class); + IElementType NULLABLE_TYPE = JetStubElementTypes.NULLABLE_TYPE; JetNodeType TYPE_PROJECTION = new JetNodeType("TYPE_PROJECTION", JetTypeProjection.class); // TODO: review diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetNullableType.java b/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetNullableType.java index 13a4b4baac6..065d318b935 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetNullableType.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetNullableType.java @@ -18,17 +18,23 @@ package org.jetbrains.jet.lang.psi; import com.intellij.lang.ASTNode; import org.jetbrains.annotations.NotNull; +import org.jetbrains.jet.lang.psi.stubs.PsiJetPlaceHolderStub; +import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes; import org.jetbrains.annotations.Nullable; import org.jetbrains.jet.lexer.JetTokens; import java.util.Collections; import java.util.List; -public class JetNullableType extends JetElementImpl implements JetTypeElement { +public class JetNullableType extends JetElementImplStub> implements JetTypeElement { public JetNullableType(@NotNull ASTNode node) { super(node); } - + + public JetNullableType(@NotNull PsiJetPlaceHolderStub stub) { + super(stub, JetStubElementTypes.NULLABLE_TYPE); + } + @NotNull public ASTNode getQuestionMarkNode() { return getNode().findChildByType(JetTokens.QUEST); diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/elements/JetStubElementTypes.java b/compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/elements/JetStubElementTypes.java index 0192d740476..9c2f5820144 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/elements/JetStubElementTypes.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/elements/JetStubElementTypes.java @@ -50,4 +50,7 @@ public interface JetStubElementTypes { JetPlaceHolderStubElementType TYPE_CONSTRAINT_LIST = new JetPlaceHolderStubElementType("TYPE_CONSTRAINT_LIST", JetTypeConstraintList.class); + + JetPlaceHolderStubElementType NULLABLE_TYPE = + new JetPlaceHolderStubElementType("NULLABLE_TYPE", JetNullableType.class); }