[FIR] Bring equivalent call behavior closer to K1

#KT-61159 Fixed
This commit is contained in:
Kirill Rakhman
2023-08-14 17:01:29 +02:00
committed by Space Team
parent 7c67e9e08b
commit fa77e3952d
39 changed files with 408 additions and 126 deletions
@@ -12,13 +12,13 @@ FILE: mixingImplicitAndExplicitReceivers.kt
public final fun withThis(): R|kotlin/Unit| {
when () {
!=(this@R|/Wrapper|.R|/Wrapper.s|, Null(null)) -> {
R|/takeString|(this@R|/Wrapper|.R|/Wrapper.s|)
<Ambiguity: takeString, [/takeString, /takeString]>#(this@R|/Wrapper|.R|/Wrapper.s|)
}
}
when () {
!=(this@R|/Wrapper|.R|/Wrapper.s|, Null(null)) -> {
R|/takeString|(this@R|/Wrapper|.R|/Wrapper.s|)
<Ambiguity: takeString, [/takeString, /takeString]>#(this@R|/Wrapper|.R|/Wrapper.s|)
}
}
@@ -3,10 +3,10 @@
class Wrapper(val s: String?) {
fun withThis() {
if (s != null) {
takeString(this.s) // Should be OK
<!OVERLOAD_RESOLUTION_AMBIGUITY!>takeString<!>(this.s) // Should be OK
}
if (this.s != null) {
takeString(s) // Should be OK
<!OVERLOAD_RESOLUTION_AMBIGUITY!>takeString<!>(s) // Should be OK
}
}
}