[FIR] Bring equivalent call behavior closer to K1
#KT-61159 Fixed
This commit is contained in:
committed by
Space Team
parent
7c67e9e08b
commit
fa77e3952d
+2
-2
@@ -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|)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user