4c0ec0fae4
`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.
10 lines
160 B
Kotlin
Vendored
10 lines
160 B
Kotlin
Vendored
fun f(a: (Int) -> Unit) {
|
|
a as Int.() -> Unit
|
|
|
|
f1(a as Int.() -> Unit)
|
|
}
|
|
|
|
fun f1(a: Int.() -> Unit) {
|
|
a as (Int) -> Unit
|
|
f(a as (Int) -> Unit)
|
|
} |