[FIR2IR] Don't insert not-needed upcasts for smartcasted expressions
Related to KT-63257
This commit is contained in:
committed by
Space Team
parent
aa1a997f8a
commit
c70a6425f5
+2
-2
@@ -175,13 +175,13 @@ fun testSmartCastOnVarWithSuspendConversion(a: Any) {
|
||||
|
||||
fun testSmartCastVsSuspendConversion(a: Function0<Unit>) {
|
||||
a as SuspendFunction0<Unit> /*~> Unit */
|
||||
useSuspend(sfn = a /*as Function<Unit> */)
|
||||
useSuspend(sfn = a)
|
||||
}
|
||||
|
||||
fun testSmartCastOnVarVsSuspendConversion(a: Function0<Unit>) {
|
||||
var b: Function0<Unit> = a
|
||||
b as SuspendFunction0<Unit> /*~> Unit */
|
||||
useSuspend(sfn = b /*as Function<Unit> */)
|
||||
useSuspend(sfn = b)
|
||||
}
|
||||
|
||||
fun <T> testIntersectionVsSuspendConversion(x: T) where T : Function0<Unit>, T : SuspendFunction0<Unit> {
|
||||
|
||||
Reference in New Issue
Block a user