Fix compatibility resolve for references with multiple outer candidates

#KT-39533 Fixed
This commit is contained in:
Mikhail Zarechenskiy
2020-06-18 16:24:09 +03:00
parent 58183b774d
commit 9c8e979308
15 changed files with 280 additions and 4 deletions
@@ -0,0 +1,25 @@
// FILE: Callable.java
public interface Callable<V> {
V call() throws Exception;
}
// FILE: Future.java
public class Future<T> {}
// FILE: Executor.java
public interface Executor {
<T> Future<T> submit(Callable<T> task);
Future<?> submit(Runnable task);
}
// FILE: test.kt
fun f(): String = "test"
class A {
fun schedule1(e: Executor): Future<String> = e.submit(::f)
fun schedule2(e: Executor): Future<String> = <!TYPE_MISMATCH!>e.submit { f() }<!>
}