[FIR2IR] Use companion as bound receiver if expected type requires it

A::foo is preferably resolved as an unbound reference to A.foo, however
if A.Companion is a subtype of A and the expected type has one fewer
parameter than the type of the unbound reference, generate a bound
reference with the companion as receiver.

^KT-56519 Fixed
This commit is contained in:
Kirill Rakhman
2023-02-28 15:55:04 +01:00
committed by Space Team
parent fc96eb6d8d
commit 1f0e6321b0
15 changed files with 158 additions and 5 deletions
@@ -5,4 +5,4 @@ class A {
}
}
fun box() = (A.Companion::ok).let { it() }
fun box() = (A.Companion::ok).let { it() }