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:
@@ -22,7 +22,6 @@ import com.intellij.psi.PsiFile;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.jet.JetTestUtils;
|
||||
import org.jetbrains.jet.cli.jvm.compiler.CliLightClassGenerationSupport;
|
||||
import org.jetbrains.jet.lang.descriptors.CallableDescriptor;
|
||||
import org.jetbrains.jet.lang.diagnostics.DiagnosticUtils;
|
||||
import org.jetbrains.jet.lang.psi.JetElement;
|
||||
import org.jetbrains.jet.lang.psi.JetFile;
|
||||
@@ -71,17 +70,16 @@ public abstract class AbstractJetDiagnosticsTest extends BaseDiagnosticsTest {
|
||||
}
|
||||
}
|
||||
|
||||
ImmutableMap<JetElement,ResolvedCall<? extends CallableDescriptor>> resolvedCallsEntries =
|
||||
bindingContext.getSliceContents(BindingContext.RESOLVED_CALL);
|
||||
for (Map.Entry<JetElement, ResolvedCall<? extends CallableDescriptor>> entry : resolvedCallsEntries.entrySet()) {
|
||||
ImmutableMap<JetElement, ResolvedCall<?>> resolvedCallsEntries = bindingContext.getSliceContents(BindingContext.RESOLVED_CALL);
|
||||
for (Map.Entry<JetElement, ResolvedCall<?>> entry : resolvedCallsEntries.entrySet()) {
|
||||
JetElement element = entry.getKey();
|
||||
ResolvedCall<? extends CallableDescriptor> resolvedCall = entry.getValue();
|
||||
ResolvedCall<?> resolvedCall = entry.getValue();
|
||||
|
||||
DiagnosticUtils.LineAndColumn lineAndColumn =
|
||||
DiagnosticUtils.getLineAndColumnInPsiFile(element.getContainingFile(), element.getTextRange());
|
||||
|
||||
assertTrue("Resolved call for '" + element.getText() + "'" + lineAndColumn + " in not completed",
|
||||
((ResolvedCallWithTrace<? extends CallableDescriptor>)resolvedCall).isCompleted());
|
||||
((ResolvedCallWithTrace<?>) resolvedCall).isCompleted());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,18 +16,12 @@
|
||||
|
||||
package org.jetbrains.jet.resolve.calls
|
||||
|
||||
import com.google.common.collect.ImmutableMap
|
||||
import org.jetbrains.annotations.NotNull
|
||||
import org.jetbrains.jet.ConfigurationKind
|
||||
import org.jetbrains.jet.JetLiteFixture
|
||||
import org.jetbrains.jet.JetTestUtils
|
||||
import org.jetbrains.jet.analyzer.AnalyzeExhaust
|
||||
import org.jetbrains.jet.cli.jvm.compiler.JetCoreEnvironment
|
||||
import org.jetbrains.jet.lang.descriptors.CallableDescriptor
|
||||
import org.jetbrains.jet.lang.diagnostics.DiagnosticUtils
|
||||
import org.jetbrains.jet.lang.psi.JetElement
|
||||
import org.jetbrains.jet.lang.psi.JetFile
|
||||
import org.jetbrains.jet.lang.resolve.AnalyzerScriptParameter
|
||||
import org.jetbrains.jet.lang.resolve.BindingContext
|
||||
import org.jetbrains.jet.lang.resolve.calls.model.ResolvedCall
|
||||
import org.jetbrains.jet.lang.resolve.calls.tasks.ExplicitReceiverKind
|
||||
@@ -54,14 +48,14 @@ public abstract class AbstractResolvedCallsTest() : JetLiteFixture() {
|
||||
}
|
||||
val explicitReceiverKind = directives.getExplicitReceiverKind()
|
||||
|
||||
fun analyzeFileAndGetResolvedCallEntries(): Map<JetElement, ResolvedCall<out CallableDescriptor?>> {
|
||||
fun analyzeFileAndGetResolvedCallEntries(): Map<JetElement, ResolvedCall<*>> {
|
||||
val psiFile = JetTestUtils.loadJetFile(getProject(), file)
|
||||
val analyzeExhaust = AnalyzerFacadeForJVM.analyzeOneFileWithJavaIntegration(psiFile, Collections.emptyList())
|
||||
val bindingContext = analyzeExhaust!!.getBindingContext()
|
||||
val bindingContext = analyzeExhaust.getBindingContext()
|
||||
return bindingContext.getSliceContents(BindingContext.RESOLVED_CALL)
|
||||
}
|
||||
|
||||
fun checkResolvedCall(resolvedCall: ResolvedCall<out CallableDescriptor?>, element: JetElement) {
|
||||
fun checkResolvedCall(resolvedCall: ResolvedCall<*>, element: JetElement) {
|
||||
val lineAndColumn = DiagnosticUtils.getLineAndColumnInPsiFile(element.getContainingFile(), element.getTextRange())
|
||||
|
||||
val (actualThisObject, actualReceiverArgument, actualExplicitReceiverKind) = with(resolvedCall) {
|
||||
|
||||
Reference in New Issue
Block a user