diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetParameter.java b/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetParameter.java index e7604b0d658..66308987995 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetParameter.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetParameter.java @@ -82,13 +82,8 @@ public class JetParameter extends JetNamedDeclarationStub { } public boolean isVarArg() { - PsiJetParameterStub stub = getStub(); - if (stub != null) { - return stub.isVarArg(); - } - JetModifierList modifierList = getModifierList(); - return modifierList != null && modifierList.getModifierNode(JetTokens.VARARG_KEYWORD) != null; + return modifierList != null && modifierList.hasModifier(JetTokens.VARARG_KEYWORD); } public boolean hasValOrVarNode() { diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/PsiJetParameterStub.java b/compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/PsiJetParameterStub.java index 5f4dab8cd6c..873ef511741 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/PsiJetParameterStub.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/PsiJetParameterStub.java @@ -20,7 +20,6 @@ import org.jetbrains.jet.lang.psi.JetParameter; public interface PsiJetParameterStub extends PsiJetStubWithFqName { boolean isMutable(); - boolean isVarArg(); boolean hasValOrValNode(); boolean hasDefaultValue(); } diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/elements/JetParameterElementType.java b/compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/elements/JetParameterElementType.java index 2792b2500f1..eac4f4fa1d3 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/elements/JetParameterElementType.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/elements/JetParameterElementType.java @@ -39,8 +39,7 @@ public class JetParameterElementType extends JetStubElementType implements PsiJetParameterStub { private final StringRef name; private final boolean isMutable; - private final boolean isVarArg; //TODO: store as StringRef private final FqName fqName; private final boolean hasValOrValNode; @@ -38,14 +37,12 @@ public class PsiJetParameterStubImpl extends StubBase implements P StubElement parent, FqName fqName, StringRef name, boolean isMutable, - boolean isVarArg, boolean hasValOrValNode, boolean hasDefaultValue ) { super(parent, JetStubElementTypes.VALUE_PARAMETER); this.name = name; this.isMutable = isMutable; - this.isVarArg = isVarArg; this.fqName = fqName; this.hasValOrValNode = hasValOrValNode; this.hasDefaultValue = hasDefaultValue; @@ -61,11 +58,6 @@ public class PsiJetParameterStubImpl extends StubBase implements P return isMutable; } - @Override - public boolean isVarArg() { - return isVarArg; - } - @Override public boolean hasValOrValNode() { return hasValOrValNode; @@ -83,10 +75,6 @@ public class PsiJetParameterStubImpl extends StubBase implements P builder.append(isMutable() ? "var " : "val "); - if (isVarArg()) { - builder.append("vararg "); - } - builder.append("name=").append(getName()); if (fqName != null) { builder.append(" fqName=").append(fqName.toString()).append(" ");