c7435ba760
We are going to deprecate `WITH_RUNTIME` directive. The main reason behind this change is that `WITH_STDLIB` directive better describes its meaning, specifically it will add kotlin stdlib to test's classpath.
35 lines
964 B
Kotlin
Vendored
35 lines
964 B
Kotlin
Vendored
// TARGET_BACKEND: JVM
|
|
// WITH_STDLIB
|
|
// FULL_JDK
|
|
// FILE: OverloadResolutionResultsImpl.java
|
|
|
|
import java.util.*;
|
|
|
|
public class OverloadResolutionResultsImpl<D> {
|
|
public Collection<ResolvedCall<D>> getAllCandidates() {
|
|
return Collections.emptyList();
|
|
}
|
|
|
|
public void setAllCandidates(Collection<ResolvedCall<D>> allCandidates) {
|
|
}
|
|
|
|
public static <R> OverloadResolutionResultsImpl<R> nameNotFound() {
|
|
OverloadResolutionResultsImpl<R> results = new OverloadResolutionResultsImpl<>();
|
|
results.setAllCandidates(Collections.emptyList());
|
|
return results;
|
|
}
|
|
}
|
|
|
|
// FILE: AllCandidates.kt
|
|
|
|
class ResolvedCall<C>
|
|
|
|
class MyCandidate(val resolvedCall: ResolvedCall<*>)
|
|
|
|
private fun <A> allCandidatesResult(allCandidates: Collection<MyCandidate>) =
|
|
OverloadResolutionResultsImpl.nameNotFound<A>().apply {
|
|
this.allCandidates = allCandidates.map {
|
|
it.resolvedCall as ResolvedCall<A>
|
|
}
|
|
}
|