Files
Anastasia Pikalova f2f5834cda [kotlin] Update SubclassOptInRequired quickFixes following KT-70562 changes
Added tests for SubclassOptInRequired with multiple markers

^KTIJ-31183 Fixed

GitOrigin-RevId: 8f4bb49fc94777c25002dcce3e05ec2453a5e50d
2024-09-23 16:37:56 +02:00

42 lines
1.1 KiB
Kotlin

// PROBLEM: none
// WITH_STDLIB
@file:OptIn(ExperimentalSubclassOptIn::class)
@RequiresOptIn(message = "Interfaces in this library are experimental for implementation")
annotation class UnstableApiA
@RequiresOptIn(message = "Interfaces in this library are experimental for implementation")
annotation class UnstableApiB
@SubclassOptInRequired(UnstableApiA::class, UnstableApiB::class)
interface CoreLibraryApi
@OptIn(UnstableApiA::class)
@OptIn(UnstableApiB::class)
interface SomeImplementationInterface : CoreLibraryApi
@OptIn(UnstableApiA::class)
@OptIn(UnstableApiB::class)
object SomeImplementationObject : CoreLibraryApi
@OptIn(UnstableApiA::class)
@OptIn(UnstableApiB::class)
class SomeImplementationClass : CoreLibraryApi
@OptIn(UnstableApiA::class)
@OptIn(UnstableApiB::class)
enum class SomeImplementationEnum : CoreLibraryApi
@OptIn(UnstableApiA::class)
@OptIn(UnstableApiB::class)
val apiUseSiteProperty = object : CoreLibraryApi {}
@OptIn(UnstableApiA::class)
@OptIn(UnstableApiB::class)
fun test() {
val apiUseSiteProperty = object : CoreLibraryApi {}
}
class SomeChild : SomeImplementationInterface<caret>