Davide Giuseppe Farella
06/09/2023, 9:03 AMcontext(List<*>)
• context(List<out SomeBaseStuff>)
As compilation crashes with
The root cause java.lang.IllegalStateException was thrown at: org.jetbrains.kotlin.psi2ir.generators.DescriptorStorageForContextReceivers.getSyntheticField(DescriptorStorageForContextReceivers.kt)
…
Caused by: java.lang.IllegalStateException: No synthetic field for receiver value …Is this something expected and we’re just lacking IDE support, or is it something that will be fixed?
Gleb Minaev
06/09/2023, 9:24 AMfun main() {
with(listOf(1, 2, 3)) {
println(test())
}
}
context(List<*>) fun test() = size
Davide Giuseppe Farella
06/09/2023, 9:25 AMDavide Giuseppe Farella
06/09/2023, 9:26 AM