[MPP] Apply @UnsafeNumber to functions and properties
KT-51224 KT-51215
This commit is contained in:
committed by
teamcity
parent
f8a1395a03
commit
6674c3f482
native/commonizer/testData/callableMemberCommonization/returnTypes/commonized/common/package_root.kt
Vendored
+4
@@ -28,9 +28,13 @@ expect fun function6(): Planet
|
||||
expect fun function7(): C
|
||||
|
||||
// Optimistic Number Commonization: KT-48455, KT-48568
|
||||
@kotlinx.cinterop.UnsafeNumber(["js: kotlin.Int", "jvm: kotlin.Long"])
|
||||
expect val propertyWithMismatchedType1: Int
|
||||
@kotlinx.cinterop.UnsafeNumber(["js: kotlin.Int", "jvm: kotlin.Short"])
|
||||
expect val propertyWithMismatchedType2: Short
|
||||
@kotlinx.cinterop.UnsafeNumber(["js: kotlin.Int", "jvm: kotlin.Long"])
|
||||
expect fun functionWithMismatchedType1(): Int
|
||||
@kotlinx.cinterop.UnsafeNumber(["js: kotlin.Int", "jvm: kotlin.Short"])
|
||||
expect fun functionWithMismatchedType2(): Short
|
||||
|
||||
expect class Box<T>(value: T) {
|
||||
|
||||
native/commonizer/testData/callableMemberCommonization/returnTypes/dependency/common/UnsafeNumber.kt
Vendored
+4
@@ -0,0 +1,4 @@
|
||||
package kotlinx.cinterop
|
||||
@Target(AnnotationTarget.TYPEALIAS, AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY)
|
||||
@Retention(AnnotationRetention.BINARY)
|
||||
annotation class UnsafeNumber(val actualPlatformTypes: Array<String>)
|
||||
Reference in New Issue
Block a user