diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/psi/Call.java b/compiler/frontend/src/org/jetbrains/jet/lang/psi/Call.java index cce8cc94c30..5baafb5720e 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/psi/Call.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/psi/Call.java @@ -17,7 +17,6 @@ package org.jetbrains.jet.lang.psi; import com.intellij.lang.ASTNode; -import com.intellij.psi.PsiElement; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import org.jetbrains.jet.lang.resolve.scopes.receivers.ReceiverValue; @@ -55,7 +54,7 @@ public interface Call { JetTypeArgumentList getTypeArgumentList(); @NotNull - PsiElement getCallElement(); + JetElement getCallElement(); enum CallType { DEFAULT, ARRAY_GET_METHOD, ARRAY_SET_METHOD, INVOKE diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetCallElement.java b/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetCallElement.java index 784469e3e32..bb1e3d1a734 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetCallElement.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetCallElement.java @@ -16,13 +16,12 @@ package org.jetbrains.jet.lang.psi; -import com.intellij.psi.PsiElement; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import java.util.List; -public interface JetCallElement extends PsiElement { +public interface JetCallElement extends JetElement { @Nullable JetExpression getCalleeExpression(); diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/CallTransformer.java b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/CallTransformer.java index d499ec362cd..1718a96ab8d 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/CallTransformer.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/CallTransformer.java @@ -19,7 +19,6 @@ package org.jetbrains.jet.lang.resolve.calls; import com.google.common.base.Function; import com.google.common.collect.Collections2; import com.google.common.collect.Lists; -import com.intellij.psi.PsiElement; import org.jetbrains.annotations.NotNull; import org.jetbrains.jet.lang.descriptors.CallableDescriptor; import org.jetbrains.jet.lang.descriptors.FunctionDescriptor; @@ -258,7 +257,7 @@ public class CallTransformer { @NotNull @Override - public PsiElement getCallElement() { + public JetElement getCallElement() { return outerCall.getCallElement(); } diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/util/CallMaker.java b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/util/CallMaker.java index 6f99900b7ed..df99acbaae6 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/util/CallMaker.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/util/CallMaker.java @@ -23,8 +23,6 @@ import com.intellij.psi.impl.source.tree.LeafPsiElement; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import org.jetbrains.jet.lang.psi.*; -import org.jetbrains.jet.lang.resolve.BindingContext; -import org.jetbrains.jet.lang.resolve.scopes.receivers.ExpressionReceiver; import org.jetbrains.jet.lang.resolve.scopes.receivers.ReceiverValue; import org.jetbrains.jet.lang.psi.Call.CallType; @@ -73,18 +71,18 @@ public class CallMaker { private static class CallImpl implements Call { - private final PsiElement callElement; + private final JetElement callElement; private final ReceiverValue explicitReceiver; private final ASTNode callOperationNode; private final JetExpression calleeExpression; private final List valueArguments; private final Call.CallType callType; - protected CallImpl(@NotNull PsiElement callElement, @NotNull ReceiverValue explicitReceiver, @Nullable ASTNode callOperationNode, @Nullable JetExpression calleeExpression, @NotNull List valueArguments) { + protected CallImpl(@NotNull JetElement callElement, @NotNull ReceiverValue explicitReceiver, @Nullable ASTNode callOperationNode, @Nullable JetExpression calleeExpression, @NotNull List valueArguments) { this(callElement, explicitReceiver, callOperationNode, calleeExpression, valueArguments, CallType.DEFAULT); } - protected CallImpl(@NotNull PsiElement callElement, @NotNull ReceiverValue explicitReceiver, @Nullable ASTNode callOperationNode, + protected CallImpl(@NotNull JetElement callElement, @NotNull ReceiverValue explicitReceiver, @Nullable ASTNode callOperationNode, @Nullable JetExpression calleeExpression, @NotNull List valueArguments, @NotNull CallType callType) { this.callElement = callElement; this.explicitReceiver = explicitReceiver; @@ -124,7 +122,7 @@ public class CallMaker { @NotNull @Override - public PsiElement getCallElement() { + public JetElement getCallElement() { return callElement; } @@ -287,7 +285,7 @@ public class CallMaker { @NotNull @Override - public PsiElement getCallElement() { + public JetElement getCallElement() { return callElement; } diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/util/DelegatingCall.java b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/util/DelegatingCall.java index 1c41625917b..070791f76e4 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/util/DelegatingCall.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/util/DelegatingCall.java @@ -17,7 +17,6 @@ package org.jetbrains.jet.lang.resolve.calls.util; import com.intellij.lang.ASTNode; -import com.intellij.psi.PsiElement; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import org.jetbrains.jet.lang.psi.*; @@ -89,7 +88,7 @@ public class DelegatingCall implements Call { @NotNull @Override - public PsiElement getCallElement() { + public JetElement getCallElement() { return delegate.getCallElement(); } diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/types/expressions/ControlStructureTypingUtils.java b/compiler/frontend/src/org/jetbrains/jet/lang/types/expressions/ControlStructureTypingUtils.java index 8aa55ae80e4..c14139dfb12 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/types/expressions/ControlStructureTypingUtils.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/types/expressions/ControlStructureTypingUtils.java @@ -19,7 +19,6 @@ package org.jetbrains.jet.lang.types.expressions; import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.intellij.lang.ASTNode; -import com.intellij.psi.PsiElement; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import org.jetbrains.jet.lang.descriptors.*; @@ -227,7 +226,7 @@ public class ControlStructureTypingUtils { @NotNull @Override - public PsiElement getCallElement() { + public JetElement getCallElement() { return expression; }