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
- Host: GitHub
- URL: https://github.com/reduxkotlin/is-function-bug-reproducer
- Owner: reduxkotlin
- Created: 2019-08-30T18:24:20.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-12-15T08:28:09.000Z (almost 2 years ago)
- Last Synced: 2025-06-19T11:42:39.397Z (4 months ago)
- Language: Kotlin
- Homepage:
- Size: 61.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
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.