Fix warnings in compiler and interop

This commit is contained in:
Pavel Punegov
2019-01-24 20:51:02 +03:00
committed by Pavel Punegov
parent c1fa7f0f79
commit 3e153e5937
10 changed files with 12 additions and 22 deletions
+1 -1
View File
@@ -74,7 +74,7 @@ sourceSets.main.kotlin.srcDirs += "src/jvm/kotlin"
compileKotlin {
kotlinOptions {
freeCompilerArgs = ['-Xuse-experimental=kotlin.ExperimentalUnsignedTypes']
freeCompilerArgs = ['-Xuse-experimental=kotlin.ExperimentalUnsignedTypes', "-XXLanguage:+InlineClasses"]
}
}
@@ -73,5 +73,4 @@ public inline class StableRef<out T : Any> @PublishedApi internal constructor(
/**
* Converts to [StableRef] this opaque pointer produced by [StableRef.asCPointer].
*/
inline fun <reified T : Any> CPointer<*>.asStableRef(): StableRef<T> = StableRef<T>(this)
.also { it.get() as T }
inline fun <reified T : Any> CPointer<*>.asStableRef(): StableRef<T> = StableRef<T>(this).also { it.get() }
@@ -398,6 +398,7 @@ private val ObjCClassOrProtocol.superTypes: Sequence<ObjCClassOrProtocol>
private fun ObjCClassOrProtocol.declaredMethods(isClass: Boolean): Sequence<ObjCMethod> =
this.methods.asSequence().filter { it.isClass == isClass }
@Suppress("UNUSED_PARAMETER")
private fun Sequence<ObjCMethod>.inheritedTo(container: ObjCClassOrProtocol, isMeta: Boolean): Sequence<ObjCMethod> =
this // TODO: exclude methods that are marked as unavailable in [container].