NI: Fix exception during callable references overload resolution

^KT-35847 Fixed
This commit is contained in:
Denis Zharkov
2020-01-15 16:10:11 +03:00
parent 588259a034
commit 676c99b933
13 changed files with 105 additions and 5 deletions
@@ -0,0 +1,15 @@
// SKIP_TXT
// !LANGUAGE: +NewInference
// !DIAGNOSTICS: -UNUSED_PARAMETER
// !CHECK_TYPE
fun <R> bar(f: () -> R): R = TODO()
fun Any.foo() = 1
fun A.foo() = ""
class A {
fun main() {
bar(<!UNRESOLVED_REFERENCE!>::foo<!>) checkType { <!INAPPLICABLE_CANDIDATE!>_<!><String>() }
}
}
@@ -0,0 +1,15 @@
// SKIP_TXT
// !LANGUAGE: +NewInference
// !DIAGNOSTICS: -UNUSED_PARAMETER
// !CHECK_TYPE
fun <R> bar(f: () -> R): R = TODO()
fun Any.foo() = 1
fun A.foo() = ""
class A {
fun main() {
bar(::foo) checkType { _<String>() }
}
}