FIR: Fix callable references resolution when they're being returned from lambdas
This commit is contained in:
@@ -1,43 +0,0 @@
|
||||
// SKIP_TXT
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
// !LANGUAGE: +NewInference
|
||||
|
||||
interface Inv<T>
|
||||
|
||||
fun <E> Inv<E>.foo(
|
||||
handler: () -> ((command: E) -> Unit)
|
||||
) {}
|
||||
|
||||
fun bar(x: Int) {}
|
||||
fun bar(x: String) {}
|
||||
|
||||
fun bar1(arg: Int) {}
|
||||
fun foo1(f: () -> (Int) -> Unit) = ""
|
||||
|
||||
fun main(x: Inv<Int>) {
|
||||
x.foo<Int> {
|
||||
if (x.hashCode() == 0) return@foo <!UNRESOLVED_REFERENCE!>::bar<!>
|
||||
|
||||
::bar
|
||||
}
|
||||
|
||||
x.foo {
|
||||
if (x.hashCode() == 0) return@foo <!UNRESOLVED_REFERENCE!>::bar<!>
|
||||
|
||||
::bar
|
||||
}
|
||||
|
||||
foo1 {
|
||||
::bar1
|
||||
}
|
||||
|
||||
foo1 {
|
||||
return@foo1 ::bar1
|
||||
}
|
||||
|
||||
foo1 {
|
||||
if (x.hashCode() == 0) return@foo1 ::bar
|
||||
|
||||
::bar
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// SKIP_TXT
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
// !LANGUAGE: +NewInference
|
||||
|
||||
Reference in New Issue
Block a user