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

20 lines
572 B
Plaintext

// "Propagate 'B' opt-in requirement to 'SomeImplementation'" "true"
@file:OptIn(ExperimentalSubclassOptIn::class)
@RequiresOptIn
annotation class A
@RequiresOptIn
annotation class B
@SubclassOptInRequired(A::class)
interface LibraryA
@SubclassOptInRequired(B::class)
interface LibraryB
@B
@SubclassOptInRequired(A::class)
interface SomeImplementation : LibraryA, LibraryB
// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.OptInFixes$PropagateOptInAnnotationFix
// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.OptInFixes$PropagateOptInAnnotationFix