diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetExpression.java b/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetExpression.java index 0ed62ea7b6e..052f67dc076 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetExpression.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetExpression.java @@ -16,9 +16,20 @@ package org.jetbrains.jet.lang.psi; +import com.intellij.util.ArrayFactory; import org.jetbrains.annotations.NotNull; public interface JetExpression extends JetElement { + JetExpression[] EMPTY_ARRAY = new JetExpression[0]; + + ArrayFactory ARRAY_FACTORY = new ArrayFactory() { + @NotNull + @Override + public JetExpression[] create(int count) { + return count == 0 ? EMPTY_ARRAY : new JetExpression[count]; + } + }; + @Override R accept(@NotNull JetVisitor visitor, D data); }