Don't write "ResolvedCall<? extends CallableDescriptor>"
ResolvedCall has a type parameter D which extends CallableDescriptor. Hence in Java "ResolvedCall<? extends CallableDescriptor>" = "ResolvedCall<?>" The same story with these classes: - ResolutionTask - CallCandidateResolutionContext - OverloadResolutionResults
This commit is contained in:
+1
-2
@@ -20,7 +20,6 @@ import com.google.dart.compiler.backend.js.ast.*;
|
||||
import com.intellij.util.SmartList;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.jet.lang.descriptors.CallableDescriptor;
|
||||
import org.jetbrains.jet.lang.descriptors.ConstructorDescriptor;
|
||||
import org.jetbrains.jet.lang.descriptors.DeclarationDescriptor;
|
||||
import org.jetbrains.jet.lang.descriptors.PropertyDescriptor;
|
||||
@@ -125,7 +124,7 @@ public final class ClassInitializerTranslator extends AbstractTranslator {
|
||||
|
||||
@NotNull
|
||||
private List<JsExpression> translateArguments(@NotNull JetDelegatorToSuperCall superCall) {
|
||||
ResolvedCall<? extends CallableDescriptor> call = context().bindingContext().get(BindingContext.RESOLVED_CALL, superCall.getCalleeExpression());
|
||||
ResolvedCall<?> call = context().bindingContext().get(BindingContext.RESOLVED_CALL, superCall.getCalleeExpression());
|
||||
assert call != null : "ResolvedCall for superCall must be not null";
|
||||
return CallArgumentTranslator.translate(call, null, context()).getTranslateArguments();
|
||||
}
|
||||
|
||||
@@ -137,17 +137,15 @@ public final class BindingUtils {
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public static ResolvedCall<?> getResolvedCall(@NotNull BindingContext context,
|
||||
@NotNull JetExpression expression) {
|
||||
ResolvedCall<? extends CallableDescriptor> resolvedCall = context.get(BindingContext.RESOLVED_CALL, expression);
|
||||
public static ResolvedCall<?> getResolvedCall(@NotNull BindingContext context, @NotNull JetExpression expression) {
|
||||
ResolvedCall<?> resolvedCall = context.get(BindingContext.RESOLVED_CALL, expression);
|
||||
assert resolvedCall != null : message(expression, expression.getText() + " must resolve to a call");
|
||||
return resolvedCall;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public static ResolvedCall<?> getResolvedCallForProperty(@NotNull BindingContext context,
|
||||
@NotNull JetExpression expression) {
|
||||
ResolvedCall<? extends CallableDescriptor> resolvedCall = context.get(BindingContext.RESOLVED_CALL, expression);
|
||||
public static ResolvedCall<?> getResolvedCallForProperty(@NotNull BindingContext context, @NotNull JetExpression expression) {
|
||||
ResolvedCall<?> resolvedCall = context.get(BindingContext.RESOLVED_CALL, expression);
|
||||
assert resolvedCall != null : message(expression, expression.getText() + " must resolve to a call");
|
||||
if (resolvedCall instanceof VariableAsFunctionResolvedCall) {
|
||||
return ((VariableAsFunctionResolvedCall) resolvedCall).getVariableCall();
|
||||
|
||||
Reference in New Issue
Block a user