Files
Nikolay Lunyak 4c0ec0fae4 [FIR] Remove redundant checks from isUpcast() and isExactTypeCast()
`T.() -> R` and `(T) -> R` should only be
different for resolution, but casts are only
about typechecking. Values of either of
these types can always be put into variables
of the other type.
2024-03-08 15:37:45 +00:00

10 lines
236 B
Kotlin
Vendored

fun f(a: (Int) -> Unit) {
a <!USELESS_CAST!>as Int.() -> Unit<!>
f1(a <!USELESS_CAST!>as Int.() -> Unit<!>)
}
fun f1(a: Int.() -> Unit) {
a <!USELESS_CAST!>as (Int) -> Unit<!>
f(a <!USELESS_CAST!>as (Int) -> Unit<!>)
}