[Commonizer] Source-based tests on lifting up identical type aliases

^KMM-55
This commit is contained in:
Dmitriy Dolovov
2020-06-01 16:22:17 +07:00
parent e5885e9277
commit d9bfe11ca1
16 changed files with 208 additions and 95 deletions
@@ -13,6 +13,7 @@ expect fun function1(text: String): String
expect fun <Q : Number> Q.function2(): Q
expect class AnnotatedClass(value: String) { val value: String }
expect class AnnotatedTypeAlias
typealias AnnotatedLiftedUpTypeAlias = AnnotatedClass
expect class AnnotatedNonLiftedUpTypeAlias
//expect object ObjectWithNestedAnnotations
@@ -53,9 +53,13 @@ actual fun <@JsAnnotation("type-parameter") @CommonAnnotation("type-parameter")
@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
@JsAnnotation("js-only-class")
@CommonAnnotation("js-only-class")
class JsOnlyAnnotatedClass @JsAnnotation("js-only-constructor") @CommonAnnotation("js-only-constructor") constructor(val value: String)
@JsAnnotation("non-lifted-up-type-alias")
@CommonAnnotation("non-lifted-up-type-alias")
actual typealias AnnotatedNonLiftedUpTypeAlias = JsOnlyAnnotatedClass
//@JsOuterAnnotation(inner = JsInnerAnnotation("nested-annotations"))
//@CommonOuterAnnotation(inner = CommonInnerAnnotation("nested-annotations"))
@@ -53,9 +53,13 @@ actual fun <@JvmAnnotation("type-parameter") @CommonAnnotation("type-parameter")
@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
@JvmAnnotation("jvm-only-class")
@CommonAnnotation("jvm-only-class")
class JvmOnlyAnnotatedClass @JvmAnnotation("jvm-only-constructor") @CommonAnnotation("jvm-only-constructor") constructor(val value: String)
@JvmAnnotation("non-lifted-up-type-alias")
@CommonAnnotation("non-lifted-up-type-alias")
actual typealias AnnotatedNonLiftedUpTypeAlias = JvmOnlyAnnotatedClass
//@JvmOuterAnnotation(inner = JvmInnerAnnotation("nested-annotations"))
//@CommonOuterAnnotation(inner = CommonInnerAnnotation("nested-annotations"))