Rename Kotlin/Native modules for uniformity
This commit is contained in:
Vendored
+18
@@ -0,0 +1,18 @@
|
||||
expect annotation class CommonAnnotationForAnnotationClassesOnly(text: String) { val text: String }
|
||||
expect annotation class CommonAnnotation(text: String) { val text: String }
|
||||
|
||||
expect annotation class CommonOuterAnnotation(inner: CommonInnerAnnotation) { val inner: CommonInnerAnnotation }
|
||||
expect annotation class CommonInnerAnnotation(text: String) { val text: String }
|
||||
|
||||
expect var propertyWithoutBackingField: Double
|
||||
expect val propertyWithBackingField: Double
|
||||
expect val propertyWithDelegateField: Int
|
||||
expect val <T : CharSequence> T.propertyWithExtensionReceiver: Int
|
||||
|
||||
expect fun function1(text: String): String
|
||||
expect fun <Q : Number> Q.function2(): Q
|
||||
|
||||
expect class AnnotatedClass(value: String) { val value: String }
|
||||
expect class AnnotatedTypeAlias
|
||||
|
||||
expect object ObjectWithNestedAnnotations
|
||||
+62
@@ -0,0 +1,62 @@
|
||||
import kotlin.annotation.AnnotationTarget.*
|
||||
|
||||
@Target(ANNOTATION_CLASS)
|
||||
actual annotation class CommonAnnotationForAnnotationClassesOnly actual constructor(actual val text: String)
|
||||
|
||||
@Target(PROPERTY, PROPERTY_GETTER, PROPERTY_SETTER, FIELD, VALUE_PARAMETER, TYPE_PARAMETER, FUNCTION, CLASS, CONSTRUCTOR, TYPEALIAS, TYPE)
|
||||
@JsAnnotationForAnnotationClassesOnly("annotation-class")
|
||||
@CommonAnnotationForAnnotationClassesOnly("annotation-class")
|
||||
actual annotation class CommonAnnotation actual constructor(actual val text: String)
|
||||
|
||||
@Target(ANNOTATION_CLASS)
|
||||
annotation class JsAnnotationForAnnotationClassesOnly(val text: String)
|
||||
|
||||
@Target(PROPERTY, PROPERTY_GETTER, PROPERTY_SETTER, FIELD, VALUE_PARAMETER, TYPE_PARAMETER, FUNCTION, CLASS, CONSTRUCTOR, TYPEALIAS, TYPE)
|
||||
@JsAnnotationForAnnotationClassesOnly("annotation-class")
|
||||
@CommonAnnotationForAnnotationClassesOnly("annotation-class")
|
||||
annotation class JsAnnotation(val text: String)
|
||||
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
actual annotation class CommonOuterAnnotation(actual val inner: CommonInnerAnnotation)
|
||||
actual annotation class CommonInnerAnnotation(actual val text: String)
|
||||
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
annotation class JsOuterAnnotation(val inner: JsInnerAnnotation)
|
||||
annotation class JsInnerAnnotation(val text: String)
|
||||
|
||||
@JsAnnotation("property")
|
||||
@CommonAnnotation("property")
|
||||
actual var propertyWithoutBackingField
|
||||
@JsAnnotation("getter") @CommonAnnotation("getter") get() = 3.14
|
||||
@JsAnnotation("setter") @CommonAnnotation("setter") set(@JsAnnotation("parameter") @CommonAnnotation("parameter") value) = Unit
|
||||
|
||||
@field:JsAnnotation("field")
|
||||
@field:CommonAnnotation("field")
|
||||
actual val propertyWithBackingField = 3.14
|
||||
|
||||
@delegate:JsAnnotation("field")
|
||||
@delegate:CommonAnnotation("field")
|
||||
actual val propertyWithDelegateField: Int by lazy { 42 }
|
||||
|
||||
actual val <@JsAnnotation("type-parameter") @CommonAnnotation("type-parameter") T : CharSequence> @receiver:JsAnnotation("receiver") @receiver:CommonAnnotation("receiver") T.propertyWithExtensionReceiver: Int
|
||||
get() = length
|
||||
|
||||
@JsAnnotation("function")
|
||||
@CommonAnnotation("function")
|
||||
actual fun function1(@JsAnnotation("parameter") @CommonAnnotation("parameter") text: String) = text
|
||||
|
||||
@JsAnnotation("function")
|
||||
@CommonAnnotation("function")
|
||||
actual fun <@JsAnnotation("type-parameter") @CommonAnnotation("type-parameter") Q : @JsAnnotation("type1") @CommonAnnotation("type1") Number> @receiver:JsAnnotation("receiver") @receiver:CommonAnnotation("receiver") Q.function2(): @JsAnnotation("type2") @CommonAnnotation("type2") Q = this
|
||||
|
||||
@JsAnnotation("class")
|
||||
@CommonAnnotation("class")
|
||||
actual class AnnotatedClass @JsAnnotation("constructor") @CommonAnnotation("constructor") actual constructor(actual val value: String)
|
||||
|
||||
@JsAnnotation("type-alias")
|
||||
@CommonAnnotation("type-alias")
|
||||
actual typealias AnnotatedTypeAlias = AnnotatedClass
|
||||
|
||||
@JsOuterAnnotation(inner = JsInnerAnnotation("nested-annotations"))
|
||||
@CommonOuterAnnotation(inner = CommonInnerAnnotation("nested-annotations"))
|
||||
actual object ObjectWithNestedAnnotations
|
||||
+62
@@ -0,0 +1,62 @@
|
||||
import kotlin.annotation.AnnotationTarget.*
|
||||
|
||||
@Target(ANNOTATION_CLASS)
|
||||
actual annotation class CommonAnnotationForAnnotationClassesOnly actual constructor(actual val text: String)
|
||||
|
||||
@Target(PROPERTY, PROPERTY_GETTER, PROPERTY_SETTER, FIELD, VALUE_PARAMETER, TYPE_PARAMETER, FUNCTION, CLASS, CONSTRUCTOR, TYPEALIAS, TYPE)
|
||||
@JvmAnnotationForAnnotationClassesOnly("annotation-class")
|
||||
@CommonAnnotationForAnnotationClassesOnly("annotation-class")
|
||||
actual annotation class CommonAnnotation actual constructor(actual val text: String)
|
||||
|
||||
@Target(ANNOTATION_CLASS)
|
||||
annotation class JvmAnnotationForAnnotationClassesOnly(val text: String)
|
||||
|
||||
@Target(PROPERTY, PROPERTY_GETTER, PROPERTY_SETTER, FIELD, VALUE_PARAMETER, TYPE_PARAMETER, FUNCTION, CLASS, CONSTRUCTOR, TYPEALIAS, TYPE)
|
||||
@JvmAnnotationForAnnotationClassesOnly("annotation-class")
|
||||
@CommonAnnotationForAnnotationClassesOnly("annotation-class")
|
||||
annotation class JvmAnnotation(val text: String)
|
||||
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
actual annotation class CommonOuterAnnotation(actual val inner: CommonInnerAnnotation)
|
||||
actual annotation class CommonInnerAnnotation(actual val text: String)
|
||||
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
annotation class JvmOuterAnnotation(val inner: JvmInnerAnnotation)
|
||||
annotation class JvmInnerAnnotation(val text: String)
|
||||
|
||||
@JvmAnnotation("property")
|
||||
@CommonAnnotation("property")
|
||||
actual var propertyWithoutBackingField
|
||||
@JvmAnnotation("getter") @CommonAnnotation("getter") get() = 3.14
|
||||
@JvmAnnotation("setter") @CommonAnnotation("setter") set(@JvmAnnotation("parameter") @CommonAnnotation("parameter") value) = Unit
|
||||
|
||||
@field:JvmAnnotation("field")
|
||||
@field:CommonAnnotation("field")
|
||||
actual val propertyWithBackingField = 3.14
|
||||
|
||||
@delegate:JvmAnnotation("field")
|
||||
@delegate:CommonAnnotation("field")
|
||||
actual val propertyWithDelegateField: Int by lazy { 42 }
|
||||
|
||||
actual val <@JvmAnnotation("type-parameter") @CommonAnnotation("type-parameter") T : CharSequence> @receiver:JvmAnnotation("receiver") @receiver:CommonAnnotation("receiver") T.propertyWithExtensionReceiver: Int
|
||||
get() = length
|
||||
|
||||
@JvmAnnotation("function")
|
||||
@CommonAnnotation("function")
|
||||
actual fun function1(@JvmAnnotation("parameter") @CommonAnnotation("parameter") text: String) = text
|
||||
|
||||
@JvmAnnotation("function")
|
||||
@CommonAnnotation("function")
|
||||
actual fun <@JvmAnnotation("type-parameter") @CommonAnnotation("type-parameter") Q : @JvmAnnotation("type1") @CommonAnnotation("type1") Number> @receiver:JvmAnnotation("receiver") @receiver:CommonAnnotation("receiver") Q.function2(): @JvmAnnotation("type2") @CommonAnnotation("type2") Q = this
|
||||
|
||||
@JvmAnnotation("class")
|
||||
@CommonAnnotation("class")
|
||||
actual class AnnotatedClass @JvmAnnotation("constructor") @CommonAnnotation("constructor") actual constructor(actual val value: String)
|
||||
|
||||
@JvmAnnotation("type-alias")
|
||||
@CommonAnnotation("type-alias")
|
||||
actual typealias AnnotatedTypeAlias = AnnotatedClass
|
||||
|
||||
@JvmOuterAnnotation(inner = JvmInnerAnnotation("nested-annotations"))
|
||||
@CommonOuterAnnotation(inner = CommonInnerAnnotation("nested-annotations"))
|
||||
actual object ObjectWithNestedAnnotations
|
||||
+62
@@ -0,0 +1,62 @@
|
||||
import kotlin.annotation.AnnotationTarget.*
|
||||
|
||||
@Target(ANNOTATION_CLASS)
|
||||
annotation class CommonAnnotationForAnnotationClassesOnly(val text: String)
|
||||
|
||||
@Target(PROPERTY, PROPERTY_GETTER, PROPERTY_SETTER, FIELD, VALUE_PARAMETER, TYPE_PARAMETER, FUNCTION, CLASS, CONSTRUCTOR, TYPEALIAS, TYPE)
|
||||
@JsAnnotationForAnnotationClassesOnly("annotation-class")
|
||||
@CommonAnnotationForAnnotationClassesOnly("annotation-class")
|
||||
annotation class CommonAnnotation(val text: String)
|
||||
|
||||
@Target(ANNOTATION_CLASS)
|
||||
annotation class JsAnnotationForAnnotationClassesOnly(val text: String)
|
||||
|
||||
@Target(PROPERTY, PROPERTY_GETTER, PROPERTY_SETTER, FIELD, VALUE_PARAMETER, TYPE_PARAMETER, FUNCTION, CLASS, CONSTRUCTOR, TYPEALIAS, TYPE)
|
||||
@JsAnnotationForAnnotationClassesOnly("annotation-class")
|
||||
@CommonAnnotationForAnnotationClassesOnly("annotation-class")
|
||||
annotation class JsAnnotation(val text: String)
|
||||
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
annotation class CommonOuterAnnotation(val inner: CommonInnerAnnotation)
|
||||
annotation class CommonInnerAnnotation(val text: String)
|
||||
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
annotation class JsOuterAnnotation(val inner: JsInnerAnnotation)
|
||||
annotation class JsInnerAnnotation(val text: String)
|
||||
|
||||
@JsAnnotation("property")
|
||||
@CommonAnnotation("property")
|
||||
var propertyWithoutBackingField
|
||||
@JsAnnotation("getter") @CommonAnnotation("getter") get() = 3.14
|
||||
@JsAnnotation("setter") @CommonAnnotation("setter") set(@JsAnnotation("parameter") @CommonAnnotation("parameter") value) = Unit
|
||||
|
||||
@field:JsAnnotation("field")
|
||||
@field:CommonAnnotation("field")
|
||||
val propertyWithBackingField = 3.14
|
||||
|
||||
@delegate:JsAnnotation("field")
|
||||
@delegate:CommonAnnotation("field")
|
||||
val propertyWithDelegateField: Int by lazy { 42 }
|
||||
|
||||
val <@JsAnnotation("type-parameter") @CommonAnnotation("type-parameter") T : CharSequence> @receiver:JsAnnotation("receiver") @receiver:CommonAnnotation("receiver") T.propertyWithExtensionReceiver: Int
|
||||
get() = length
|
||||
|
||||
@JsAnnotation("function")
|
||||
@CommonAnnotation("function")
|
||||
fun function1(@JsAnnotation("parameter") @CommonAnnotation("parameter") text: String) = text
|
||||
|
||||
@JsAnnotation("function")
|
||||
@CommonAnnotation("function")
|
||||
fun <@JsAnnotation("type-parameter") @CommonAnnotation("type-parameter") Q : @JsAnnotation("type1") @CommonAnnotation("type1") Number> @receiver:JsAnnotation("receiver") @receiver:CommonAnnotation("receiver") Q.function2(): @JsAnnotation("type2") @CommonAnnotation("type2") Q = this
|
||||
|
||||
@JsAnnotation("class")
|
||||
@CommonAnnotation("class")
|
||||
class AnnotatedClass @JsAnnotation("constructor") @CommonAnnotation("constructor") constructor(val value: String)
|
||||
|
||||
@JsAnnotation("type-alias")
|
||||
@CommonAnnotation("type-alias")
|
||||
typealias AnnotatedTypeAlias = AnnotatedClass
|
||||
|
||||
@JsOuterAnnotation(inner = JsInnerAnnotation("nested-annotations"))
|
||||
@CommonOuterAnnotation(inner = CommonInnerAnnotation("nested-annotations"))
|
||||
object ObjectWithNestedAnnotations
|
||||
+62
@@ -0,0 +1,62 @@
|
||||
import kotlin.annotation.AnnotationTarget.*
|
||||
|
||||
@Target(ANNOTATION_CLASS)
|
||||
annotation class CommonAnnotationForAnnotationClassesOnly(val text: String)
|
||||
|
||||
@Target(PROPERTY, PROPERTY_GETTER, PROPERTY_SETTER, FIELD, VALUE_PARAMETER, TYPE_PARAMETER, FUNCTION, CLASS, CONSTRUCTOR, TYPEALIAS, TYPE)
|
||||
@JvmAnnotationForAnnotationClassesOnly("annotation-class")
|
||||
@CommonAnnotationForAnnotationClassesOnly("annotation-class")
|
||||
annotation class CommonAnnotation(val text: String)
|
||||
|
||||
@Target(ANNOTATION_CLASS)
|
||||
annotation class JvmAnnotationForAnnotationClassesOnly(val text: String)
|
||||
|
||||
@Target(PROPERTY, PROPERTY_GETTER, PROPERTY_SETTER, FIELD, VALUE_PARAMETER, TYPE_PARAMETER, FUNCTION, CLASS, CONSTRUCTOR, TYPEALIAS, TYPE)
|
||||
@JvmAnnotationForAnnotationClassesOnly("annotation-class")
|
||||
@CommonAnnotationForAnnotationClassesOnly("annotation-class")
|
||||
annotation class JvmAnnotation(val text: String)
|
||||
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
annotation class CommonOuterAnnotation(val inner: CommonInnerAnnotation)
|
||||
annotation class CommonInnerAnnotation(val text: String)
|
||||
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
annotation class JvmOuterAnnotation(val inner: JvmInnerAnnotation)
|
||||
annotation class JvmInnerAnnotation(val text: String)
|
||||
|
||||
@JvmAnnotation("property")
|
||||
@CommonAnnotation("property")
|
||||
var propertyWithoutBackingField
|
||||
@JvmAnnotation("getter") @CommonAnnotation("getter") get() = 3.14
|
||||
@JvmAnnotation("setter") @CommonAnnotation("setter") set(@JvmAnnotation("parameter") @CommonAnnotation("parameter") value) = Unit
|
||||
|
||||
@field:JvmAnnotation("field")
|
||||
@field:CommonAnnotation("field")
|
||||
val propertyWithBackingField = 3.14
|
||||
|
||||
@delegate:JvmAnnotation("field")
|
||||
@delegate:CommonAnnotation("field")
|
||||
val propertyWithDelegateField: Int by lazy { 42 }
|
||||
|
||||
val <@JvmAnnotation("type-parameter") @CommonAnnotation("type-parameter") T : CharSequence> @receiver:JvmAnnotation("receiver") @receiver:CommonAnnotation("receiver") T.propertyWithExtensionReceiver: Int
|
||||
get() = length
|
||||
|
||||
@JvmAnnotation("function")
|
||||
@CommonAnnotation("function")
|
||||
fun function1(@JvmAnnotation("parameter") @CommonAnnotation("parameter") text: String) = text
|
||||
|
||||
@JvmAnnotation("function")
|
||||
@CommonAnnotation("function")
|
||||
fun <@JvmAnnotation("type-parameter") @CommonAnnotation("type-parameter") Q : @JvmAnnotation("type1") @CommonAnnotation("type1") Number> @receiver:JvmAnnotation("receiver") @receiver:CommonAnnotation("receiver") Q.function2(): @JvmAnnotation("type2") @CommonAnnotation("type2") Q = this
|
||||
|
||||
@JvmAnnotation("class")
|
||||
@CommonAnnotation("class")
|
||||
class AnnotatedClass @JvmAnnotation("constructor") @CommonAnnotation("constructor") constructor(val value: String)
|
||||
|
||||
@JvmAnnotation("type-alias")
|
||||
@CommonAnnotation("type-alias")
|
||||
typealias AnnotatedTypeAlias = AnnotatedClass
|
||||
|
||||
@JvmOuterAnnotation(inner = JvmInnerAnnotation("nested-annotations"))
|
||||
@CommonOuterAnnotation(inner = CommonInnerAnnotation("nested-annotations"))
|
||||
object ObjectWithNestedAnnotations
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
package org.sample.two
|
||||
|
||||
expect val qux: Int
|
||||
native/commonizer/testData/generalCommonization/mismatchedPackages/commonized/common/package_root.kt
Vendored
+1
@@ -0,0 +1 @@
|
||||
expect val foo: Int
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
package org.sample
|
||||
|
||||
val bar = 1
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
package org.sample.one
|
||||
|
||||
val baz = 1
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
package org.sample.two
|
||||
|
||||
actual val qux = 1
|
||||
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
actual val foo = 1
|
||||
|
||||
val jsSpecificProperty = 42
|
||||
val jsAndJvmSpecificProperty = 42 * 2
|
||||
val jsAndNativeSpecificProperty = 42 * 3
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
package org.sample
|
||||
|
||||
val bar = 1
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
package org.sample.two
|
||||
|
||||
actual val qux = 1
|
||||
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
actual val foo = 1
|
||||
|
||||
val jvmSpecificProperty = 42
|
||||
val jsAndJvmSpecificProperty = 42 * 2
|
||||
val jvmAndNativeSpecificProperty = 42 * 4
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
package org.sample.one
|
||||
|
||||
val baz = 1
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
package org.sample.two
|
||||
|
||||
actual val qux = 1
|
||||
native/commonizer/testData/generalCommonization/mismatchedPackages/commonized/native/package_root.kt
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
actual val foo = 1
|
||||
|
||||
val nativeSpecificProperty = 42
|
||||
val jsAndNativeSpecificProperty = 42 * 3
|
||||
val jvmAndNativeSpecificProperty = 42 * 4
|
||||
native/commonizer/testData/generalCommonization/mismatchedPackages/original/js/package_org_sample.kt
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
package org.sample
|
||||
|
||||
val bar = 1
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
package org.sample.one
|
||||
|
||||
val baz = 1
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
package org.sample.two
|
||||
|
||||
val qux = 1
|
||||
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
val foo = 1
|
||||
|
||||
val jsSpecificProperty = 42
|
||||
val jsAndJvmSpecificProperty = 42 * 2
|
||||
val jsAndNativeSpecificProperty = 42 * 3
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
package org.sample
|
||||
|
||||
val bar = 1
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
package org.sample.two
|
||||
|
||||
val qux = 1
|
||||
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
val foo = 1
|
||||
|
||||
val jvmSpecificProperty = 42
|
||||
val jsAndJvmSpecificProperty = 42 * 2
|
||||
val jvmAndNativeSpecificProperty = 42 * 4
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
package org.sample.one
|
||||
|
||||
val baz = 1
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
package org.sample.two
|
||||
|
||||
val qux = 1
|
||||
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
val foo = 1
|
||||
|
||||
val nativeSpecificProperty = 42
|
||||
val jsAndNativeSpecificProperty = 42 * 3
|
||||
val jvmAndNativeSpecificProperty = 42 * 4
|
||||
Reference in New Issue
Block a user