Add tests for repeatable annotations on expect-actual declarations
Add tests showing current behavior. ^KT-60670
This commit is contained in:
committed by
Space Team
parent
2de9480101
commit
5ed3f308fa
+23
@@ -0,0 +1,23 @@
|
||||
// FIR_IDENTICAL
|
||||
// WITH_STDLIB
|
||||
// MODULE: m1-common
|
||||
// FILE: common.kt
|
||||
@Repeatable
|
||||
annotation class AnnNoArg
|
||||
|
||||
@AnnNoArg
|
||||
@AnnNoArg
|
||||
expect fun oneMoreOnExpect()
|
||||
|
||||
@AnnNoArg
|
||||
expect fun oneMoreOnActual()
|
||||
|
||||
// MODULE: m1-jvm()()(m1-common)
|
||||
// FILE: jvm.kt
|
||||
|
||||
@AnnNoArg
|
||||
actual fun oneMoreOnExpect() {}
|
||||
|
||||
@AnnNoArg
|
||||
@AnnNoArg
|
||||
actual fun oneMoreOnActual() {}
|
||||
Vendored
+40
@@ -0,0 +1,40 @@
|
||||
// WITH_STDLIB
|
||||
// MODULE: m1-common
|
||||
// FILE: common.kt
|
||||
@Repeatable
|
||||
annotation class AnnWithArg(val s: String)
|
||||
|
||||
@AnnWithArg(s = "1")
|
||||
@AnnWithArg(s = "2")
|
||||
expect fun diffentOrder()
|
||||
|
||||
@AnnWithArg(s = "1")
|
||||
@AnnWithArg(s = "2")
|
||||
@AnnWithArg(s = "3")
|
||||
expect fun withDifferentArgLessOnActual()
|
||||
|
||||
@AnnWithArg(s = "1")
|
||||
@AnnWithArg(s = "3")
|
||||
expect fun withDifferentArgLessOnExpect()
|
||||
|
||||
@AnnWithArg(s = "1")
|
||||
@AnnWithArg(s = "1")
|
||||
expect fun withSameArgLessOnActual()
|
||||
|
||||
// MODULE: m1-jvm()()(m1-common)
|
||||
// FILE: jvm.kt
|
||||
@AnnWithArg(s = "1")
|
||||
@AnnWithArg(s = "2")
|
||||
actual fun diffentOrder() {}
|
||||
|
||||
<!ACTUAL_ANNOTATIONS_NOT_MATCH_EXPECT!>@AnnWithArg(s = "1")
|
||||
@AnnWithArg(s = "3")
|
||||
actual fun <!ACTUAL_ANNOTATIONS_NOT_MATCH_EXPECT!>withDifferentArgLessOnActual<!>() {}<!>
|
||||
|
||||
@AnnWithArg(s = "1")
|
||||
@AnnWithArg(s = "2")
|
||||
@AnnWithArg(s = "3")
|
||||
actual fun withDifferentArgLessOnExpect() {}
|
||||
|
||||
@AnnWithArg(s = "1")
|
||||
actual fun withSameArgLessOnActual() {}
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
// WITH_STDLIB
|
||||
// MODULE: m1-common
|
||||
// FILE: common.kt
|
||||
@Repeatable
|
||||
annotation class AnnWithArg(val s: String)
|
||||
|
||||
@AnnWithArg(s = "1")
|
||||
@AnnWithArg(s = "2")
|
||||
expect fun diffentOrder()
|
||||
|
||||
@AnnWithArg(s = "1")
|
||||
@AnnWithArg(s = "2")
|
||||
@AnnWithArg(s = "3")
|
||||
expect fun withDifferentArgLessOnActual()
|
||||
|
||||
@AnnWithArg(s = "1")
|
||||
@AnnWithArg(s = "3")
|
||||
expect fun withDifferentArgLessOnExpect()
|
||||
|
||||
@AnnWithArg(s = "1")
|
||||
@AnnWithArg(s = "1")
|
||||
expect fun withSameArgLessOnActual()
|
||||
|
||||
// MODULE: m1-jvm()()(m1-common)
|
||||
// FILE: jvm.kt
|
||||
@AnnWithArg(s = "1")
|
||||
@AnnWithArg(s = "2")
|
||||
actual fun diffentOrder() {}
|
||||
|
||||
@AnnWithArg(s = "1")
|
||||
@AnnWithArg(s = "3")
|
||||
actual fun <!ACTUAL_ANNOTATIONS_NOT_MATCH_EXPECT!>withDifferentArgLessOnActual<!>() {}
|
||||
|
||||
@AnnWithArg(s = "1")
|
||||
@AnnWithArg(s = "2")
|
||||
@AnnWithArg(s = "3")
|
||||
actual fun withDifferentArgLessOnExpect() {}
|
||||
|
||||
@AnnWithArg(s = "1")
|
||||
actual fun withSameArgLessOnActual() {}
|
||||
Reference in New Issue
Block a user