2cdf8cd7b1
Objective-C has a special type, "instancetype". Generally, it is a type that matches the method receiver type. So, if `Foo.foo` method returns `instancetype`, then `Foo.foo()` would be of type `Foo`, while `Bar.foo()` would be of type `Bar` (where `Bar` is a subclass of `Foo`). Surprisingly, `instancetype` can be used not only as a return type, but also somewhere inside a return type. cinterop wasn't ready for this. This commit expands implementation of `instancetype` in cinterop to cover more cases. ^KT-59597 Fixed
Kotlin-native interop
Usage
Create file ../gradle.properties with contents:
llvmInstallPath=/path/to/llvm
Create a Gradle subproject somewhere under ../, using ../InteropExample as a template.
To generate the interop stubs and libraries and build all sources you can run
the following command from ../:
./gradlew InteropExample:build
To run the example (if 'application' plugin is enabled):
./gradlew InteropExample:run