[FE] Prohibit expect or actual opt-in annotations
^KT-58554
This commit is contained in:
committed by
Space Team
parent
600bb3dbc7
commit
4a598afc36
+23
@@ -0,0 +1,23 @@
|
||||
// WITH_STDLIB
|
||||
// MODULE: m1-common
|
||||
// FILE: common.kt
|
||||
expect annotation class ActualOnly
|
||||
|
||||
@RequiresOptIn
|
||||
<!EXPECT_ACTUAL_OPT_IN_ANNOTATION!>expect<!> annotation class Both
|
||||
|
||||
@OptIn(ExperimentalMultiplatform::class)
|
||||
@RequiresOptIn
|
||||
@OptionalExpectation
|
||||
expect annotation class MyOptIn
|
||||
|
||||
// MODULE: m1-jvm()()(m1-common)
|
||||
// FILE: jvm.kt
|
||||
@RequiresOptIn
|
||||
<!EXPECT_ACTUAL_OPT_IN_ANNOTATION!>actual<!> annotation class ActualOnly
|
||||
|
||||
@RequiresOptIn
|
||||
<!EXPECT_ACTUAL_OPT_IN_ANNOTATION!>actual<!> annotation class Both
|
||||
|
||||
@RequiresOptIn
|
||||
actual annotation class MyOptIn
|
||||
@@ -0,0 +1,23 @@
|
||||
// WITH_STDLIB
|
||||
// MODULE: m1-common
|
||||
// FILE: common.kt
|
||||
expect annotation class ActualOnly
|
||||
|
||||
@RequiresOptIn
|
||||
<!EXPECT_ACTUAL_OPT_IN_ANNOTATION{JVM}!>expect<!> annotation class Both
|
||||
|
||||
@OptIn(ExperimentalMultiplatform::class)
|
||||
@RequiresOptIn
|
||||
@OptionalExpectation
|
||||
expect annotation class MyOptIn
|
||||
|
||||
// MODULE: m1-jvm()()(m1-common)
|
||||
// FILE: jvm.kt
|
||||
@RequiresOptIn
|
||||
<!EXPECT_ACTUAL_OPT_IN_ANNOTATION!>actual<!> annotation class ActualOnly
|
||||
|
||||
@RequiresOptIn
|
||||
<!EXPECT_ACTUAL_OPT_IN_ANNOTATION!>actual<!> annotation class Both
|
||||
|
||||
@RequiresOptIn
|
||||
actual annotation class MyOptIn
|
||||
Reference in New Issue
Block a user