[FIR2IR] Properly insert casts for smartcasts in argument position
Previously cast inserter didn't consider expected type for arguments of function calls ^KT-63257 Fixed
This commit is contained in:
committed by
Space Team
parent
c70a6425f5
commit
8578a0bf6a
+2
-2
@@ -175,13 +175,13 @@ fun testSmartCastOnVarWithSuspendConversion(a: Any) {
|
||||
|
||||
fun testSmartCastVsSuspendConversion(a: Function0<Unit>) {
|
||||
a as SuspendFunction0<Unit> /*~> Unit */
|
||||
useSuspend(sfn = a)
|
||||
useSuspend(sfn = a /*as SuspendFunction0<Unit> */)
|
||||
}
|
||||
|
||||
fun testSmartCastOnVarVsSuspendConversion(a: Function0<Unit>) {
|
||||
var b: Function0<Unit> = a
|
||||
b as SuspendFunction0<Unit> /*~> Unit */
|
||||
useSuspend(sfn = b)
|
||||
useSuspend(sfn = b /*as SuspendFunction0<Unit> */)
|
||||
}
|
||||
|
||||
fun <T> testIntersectionVsSuspendConversion(x: T) where T : Function0<Unit>, T : SuspendFunction0<Unit> {
|
||||
|
||||
Reference in New Issue
Block a user