https://kotlinlang.org logo
p

Patrick Jackson

07/26/2019, 1:45 PM
I may have found a bug with kotlin native. I have the following:
Copy code
type alias Bar = (String) -> Any
fun test(foo: Any) {
    if (foo is Function<*>) {
         (foo as Bar)("test")
    }
}
On JVM the conditional will be true when passing in a function. On Native it is false.
o

olonho

07/27/2019, 11:30 AM
Please report an issue with reproducer to the issue tracker
p

Patrick Jackson

08/05/2019, 4:30 PM
updated this issue with a reproducer: https://github.com/reduxkotlin/typealias-bug-reproducer