[FIR] Fix callable reference adaptation for overrides without defaults

Provide the correct scope to the argument mapping so that default values
in overridden functions are considered.

^KT-56864 Fixed
This commit is contained in:
Kirill Rakhman
2023-03-03 16:44:02 +01:00
committed by Space Team
parent 9d352694af
commit b2fbf8bed5
6 changed files with 53 additions and 2 deletions
@@ -0,0 +1,24 @@
// SKIP_TXT
// FIR_IDENTICAL
interface Some {
fun foo(b: Boolean? = null): Int = 10
}
class SomeImpl : Some {
override fun foo(b: Boolean?): Int {
return 0
}
private fun buz() {
bar(::foo)
}
}
private fun buz() {
bar(SomeImpl()::foo)
}
private fun <T> bar(actionForAll: () -> T) {
actionForAll()
}