Skip to content

reduxkotlin/is-function-bug-reproducer

Repository files navigation

Function<*> is check bug

**** FIXED AS OF KOTLIN 1.3.70 ****

This is a reproducer of a bug in Kotlin as reported in youtrack.

class FunctionCheckTest {

    @Test
    fun passIsCheck() {
        if ({ str: String -> } is Function<*>) {
        } else {
            fail("Function not recognized in `is Function<*>`")
        }
    }
}

To run:

./gradlew jvmTest <---- passes

./gradlew jsTest <---- fails

Originally thought this was a bug with typealias, however the bug exists with functions.

Behavior is not consistent between platforms. JVM passes. JS & Native fail. Only JS tests run on this project due to difficulty setting up tests. This has been observed to fail in the native environment.

About

Test to reproduce Kotlin `is Function<*>` bug

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages