[K2] Disappeared UNSUPPORTED_FEATURE (2)

Added a check for the enabled context receivers feature flag for declaration.

^KT-59913
This commit is contained in:
Anastasia.Nekrasova
2023-11-07 14:55:40 +02:00
committed by Space Team
parent 685c8e4fe7
commit c04767f1f4
8 changed files with 109 additions and 10 deletions
@@ -2,6 +2,8 @@
context(O) val INSTANCE: O? defined in O
val INSTANCE: O defined in O
/kt59590WithContextReceiver.fir.kt:5:5: error: The feature "context receivers" is experimental and should be enabled explicitly
/kt59590WithContextReceiver.fir.kt:5:5: error: Platform declaration clash: The following declarations have the same JVM signature (INSTANCELO;):
context(O) val INSTANCE: O? defined in O
val INSTANCE: O defined in O
@@ -2,7 +2,7 @@
// !RENDER_ALL_DIAGNOSTICS_FULL_TEXT
<!CONFLICTING_JVM_DECLARATIONS!>object O {
<!CONFLICTING_JVM_DECLARATIONS!>context(O)
<!CONFLICTING_JVM_DECLARATIONS!><!UNSUPPORTED_FEATURE!>context(O)<!>
@JvmField
val INSTANCE: O? = null<!>
}<!>
}<!>