An open API service indexing awesome lists of open source software.

https://github.com/reduxkotlin/is-function-bug-reproducer

Test to reproduce Kotlin `is Function<*>` bug
https://github.com/reduxkotlin/is-function-bug-reproducer

Last synced: 4 months ago
JSON representation

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

Awesome Lists containing this project

README

          

# Function<*> is check bug

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

This is a reproducer of a bug in Kotlin as [reported in youtrack](https://youtrack.jetbrains.com/issue/KT-33149).

```kotlin
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.