NI: Do not resolve static callable references on generic types

As they weren't resolved in old inference

^KT-35920 Fixed
This commit is contained in:
Denis Zharkov
2020-01-14 18:56:00 +03:00
parent c48539feb3
commit d4c34afb94
6 changed files with 44 additions and 1 deletions
@@ -0,0 +1,14 @@
// SKIP_TXT
// !LANGUAGE: +NewInference
// !DIAGNOSTICS: -UNUSED_PARAMETER
// FILE: JavaClass.java
public class JavaClass<R> {
public static String baz(int x) { return ""; }
}
// FILE: main.kt
fun foo(x: (Int) -> String) {}
fun main() {
foo(JavaClass<*>::baz)
}
@@ -0,0 +1,14 @@
// SKIP_TXT
// !LANGUAGE: +NewInference
// !DIAGNOSTICS: -UNUSED_PARAMETER
// FILE: JavaClass.java
public class JavaClass<R> {
public static String baz(int x) { return ""; }
}
// FILE: main.kt
fun foo(x: (Int) -> String) {}
fun main() {
foo(JavaClass<*>::<!UNRESOLVED_REFERENCE!>baz<!>)
}