Files
Anastasia.Nekrasova 9bf84402e6 [kotlin] Add explicit opt-in in tests with SubclassOptInRequired annotation
At the moment, SubclassOptInRequired is marked with the
ExperimentalSubclassOptIn annotation. However, it does not work
as expected due to a missing opt-in error. To use SubclassOptInRequired,
an explicit opt-in is necessary because SubclassOptInRequired is an
unstable feature now.

^KT-64739

GitOrigin-RevId: a5f43e8755a76c56597aa9f81d9057e2dba4d5c9
2024-01-15 14:21:28 +00:00

14 lines
550 B
Kotlin

// "Propagate 'SubclassOptInRequired(UnstableApi::class)' opt-in requirement to 'SomeImplementation'" "true"
@file:OptIn(ExperimentalSubclassOptIn::class)
@RequiresOptIn
annotation class UnstableApi
interface MockApi
@SubclassOptInRequired(UnstableApi::class)
interface CoreLibraryApi
abstract class SomeImplementation : MockApi, CoreLibrary<caret>Api
// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.OptInFixes$PropagateOptInAnnotationFix
// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.OptInFixes$PropagateOptInAnnotationFix