[IR] Implement getContextReceiverParameters for IrBasedPropertyDescriptor

Fixes: KT-59590
This commit is contained in:
Xin Wang
2023-08-24 17:33:32 +08:00
committed by Space Team
parent 03ad981dea
commit 51325ba630
11 changed files with 126 additions and 2 deletions
@@ -0,0 +1,7 @@
/kt59590.kt:5:1: error: Platform declaration clash: The following declarations have the same JVM signature (INSTANCELO;):
val INSTANCE: O? defined in O
val INSTANCE: O defined in O
/kt59590.kt:6:5: error: Platform declaration clash: The following declarations have the same JVM signature (INSTANCELO;):
val INSTANCE: O? defined in O
val INSTANCE: O defined in O
@@ -0,0 +1,7 @@
/kt59590.fir.kt:4:1: error: Platform declaration clash: The following declarations have the same JVM signature (INSTANCELO;):
val INSTANCE: O? defined in O
val INSTANCE: O defined in O
/kt59590.fir.kt:5:5: error: Platform declaration clash: The following declarations have the same JVM signature (INSTANCELO;):
val INSTANCE: O? defined in O
val INSTANCE: O defined in O
@@ -0,0 +1,8 @@
// FIR_IDENTICAL
// WITH_STDLIB
// !RENDER_ALL_DIAGNOSTICS_FULL_TEXT
<!CONFLICTING_JVM_DECLARATIONS!>object O {
<!CONFLICTING_JVM_DECLARATIONS!>@JvmField
val INSTANCE: O? = null<!>
}<!>
@@ -0,0 +1,13 @@
/kt59590WithContextReceiver.kt:4:1: 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
/kt59590WithContextReceiver.kt:5:5: error: The feature "context receivers" is experimental and should be enabled explicitly
/kt59590WithContextReceiver.kt:5:5: error: The feature "context receivers" is experimental and should be enabled explicitly
/kt59590WithContextReceiver.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
/kt59590WithContextReceiver.kt:7:24: error: Property with context receivers cannot be initialized because it has no backing field
@@ -0,0 +1,7 @@
/kt59590WithContextReceiver.fir.kt:4:1: 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
/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
@@ -0,0 +1,8 @@
// WITH_STDLIB
// !RENDER_ALL_DIAGNOSTICS_FULL_TEXT
<!CONFLICTING_JVM_DECLARATIONS!>object O {
<!CONFLICTING_JVM_DECLARATIONS!>context(O)
@JvmField
val INSTANCE: O? = null<!>
}<!>
@@ -0,0 +1,8 @@
// WITH_STDLIB
// !RENDER_ALL_DIAGNOSTICS_FULL_TEXT
<!CONFLICTING_JVM_DECLARATIONS!>object O {
<!CONFLICTING_JVM_DECLARATIONS!><!UNSUPPORTED_FEATURE, UNSUPPORTED_FEATURE!>context(O)<!>
@JvmField
val INSTANCE: O? = <!CONTEXT_RECEIVERS_WITH_BACKING_FIELD!>null<!><!>
}<!>