[NI] Don't apply SAM-conversion for type that is subtype of function
Plus, don't get synthetic candidates as all candidates are creating by conversion #KT-31503 Fixed
This commit is contained in:
+2
-2
@@ -16,14 +16,14 @@ fun <T> bar(s: T) {}
|
||||
fun <T> complex(t: T, f: (T) -> Unit) {}
|
||||
|
||||
fun test1() {
|
||||
foo(1, A::invokeLater) // KT-24507 SAM conversion accidentally applied to callable reference and incorrectly handled via BE
|
||||
foo(1, <!NI;TYPE_MISMATCH!>A::invokeLater<!>) // KT-24507 SAM conversion accidentally applied to callable reference and incorrectly handled via BE
|
||||
foo(1, ::bar)
|
||||
|
||||
complex(1, ::bar)
|
||||
}
|
||||
|
||||
fun <R> test2(x: R) {
|
||||
foo(x, A::invokeLater) // KT-24507 SAM conversion accidentally applied to callable reference and incorrectly handled via BE
|
||||
foo(x, <!NI;TYPE_MISMATCH!>A::invokeLater<!>) // KT-24507 SAM conversion accidentally applied to callable reference and incorrectly handled via BE
|
||||
foo(x, ::bar)
|
||||
|
||||
complex(x, ::bar)
|
||||
|
||||
Reference in New Issue
Block a user